Themo - Theme manager

Hey guys, my first asset just got released, and here it is. Themo, the Swift Theme Manager.

ASSET STORE LINK

Themo lets you define themes which you can then apply to anything that uses Color!
Create themes for:

  • Sprites
  • UI components
  • Particle Systems
  • Anything you can think of

Make things like teams, items, level segments, and enemies share a common color.

Themo uses the HSL color model, so you can define one color in the theme manager, then make small adjustments on a per-object basis.

Easily adjust:

  • Hue
  • Saturation
  • Lightness
  • Alpha

of any component.

You can tweak, and animate everything during runtime.

The following demo uses Themo to define two themes for the teams, and a constantly changing theme for the background and logo. Check it out!

Web Demo

I originally wrote this asset for a private project I’m working on, and I thought others could find a use. Code is fairly commented, I might add more in the future. I will do my best to reply to, and help with any inquiries you guys have, be it feature requests or support. :slight_smile:

Updated to version 1.0.1

Made two videos showing how to use Themo.

Just submitted an update.

The Theme Applier editor shows the original theme color, with the custom color underneath for comparison

1 Like

Hey guys, Themo is 65% off on todays 24 Hour Sale :slight_smile:

If there’s anything I can help you with, please let me know.

1 Like

2166523--143309--themeapp.png Hello KayaOrsan,

First of all, Congratz for your wonderful asset. I’m having some problem trying to apply it to a 3d sphere. I can’t get the appropiate option in contextual menú. I’ve created an empty gameobject and applied to it the “Theme Manager” script. After that I created another gameobject and applied to it the “Theme Applier” script. But when I tried to apply the change color to the sphere doesn’t appear the "Material change color " option in the menú.

Thanks

Hey Baruja, thank you!

The Theme Applier uses a UnityEvent. This means that it should be used with anything that exposes Color in its interface. The MeshRenderer used by the 3D Sphere doesn’t have that by itself. But you could easily make a little utility script that exposes Material variables, and add it to the Sphere. For example:

using UnityEngine;
using System.Collections;

public class TestScript : MonoBehaviour {

    public Color MaterialColor
    {
        get
        {
            return Renderer.sharedMaterial.color;
        }

        set
        {
            Renderer.sharedMaterial.color = value;
        }
    }

    Renderer renderer;
    public Renderer Renderer
    {
        get
        {
            if (renderer == null)
                renderer = GetComponent<Renderer>();
            return renderer;
        }
    }

}

I only used sharedColor here, but I’m sure you get the point.

Sorry for my lack in programming abilities. I’ll try this as new script.

Thank you very much

We all start somewhere. Perhaps I should include a more in depth demo scene in the next update :slight_smile:

1 Like

There was a mix up with the versions I submitted to the asset store, but it’s fixed now. Themo should look and work the same in Unity 4.6.x as it does in 5.x.

1 Like

Hey @KayaOrsan , I found your asset on the asset store and I think that it fits my needs extremely well. I implemented my own color manager but don’t feel that it is the best solution for my needs. I had a couple of questions about the asset if you don’t mind me asking:

  • Is it possible to change the theme of an object during runtime? One of the main things that I want to do is set up a “Character System” that has a color associated with each character in the game. Would I be able to change the theme of GameObjects (assuming each theme is associated with a character)? Or would I need to change a single themes color to reflect the characters color (a base theme “Player” then change that color)?
  • Can other scripts still change the color of a sprite without interfering with Themo? Right now some scripts are changing the color of the Sprite Renderer, would that interfere with Themo? Basically what happens if I wanted a sprite to flash red because they got hit but then return back to the theme color.

Hope to hear from you soon!

Hey @Darkays ,

  1. Of course. Themo allows you fully to change everything during runtime. You can select whether you want changes to apply during an Update loop automatically, or a function call you make, so you have some flexibility there. You could use Themo to set up theme colors for each of your characters, then either change these theme colors, or modify the Hue on the Theme Applier for the individual characters without touching the master theme. All during runtime. You can even animate this. In fact this is exactly what the webdemo does, be sure to check it out. Everything in that scene, including the Logo in the back, is using Themo.

  2. Sure. Themo applies its themes via a component called “Theme Applier.” You could simply enable/disable that component whenever you need. In fact a Theme Applier doesn’t even have to have any objects assigned to it. You could simply use it’s CalculatedColor property. You could also skip the middle man and get the color directly from the Theme Manager if you want to implement your own theme applicator that includes an ability to flash it red. So just off the top of my head there’s four ways you could do this:

a) Disable Theme Applier → Flash Sprite Red → Enable Theme Applier

b) Make a new theme called “Flash Color” and make it red, then just switch the Theme Applier’s current theme back and forth from the original to “Flash Color,” whenever you want to flash.

c) Use the CalculatedColor directly from code.

d) Use the theme color directly from code.

Hope this helps. Please let me know if there’s anything else :slight_smile:

1 Like

Thanks a lot for the responses @KayaOrsan ! I think I am going to try it out! I really appreciate it.