Search Unity

Organizing and implementing color palettes

Discussion in 'General Discussion' started by Mike01923, May 14, 2020.

  1. Mike01923

    Mike01923

    Joined:
    Jun 19, 2015
    Posts:
    195
    I'm wondering how you all deal with color in your game. Currently, I just have a saved palette within unity that I use to color things like buttons and camera backgrounds prefabs manually. I was thinking it would be cool to implement a dynamic color switching system where I would have a color controller that has all colors, and each object references it on start to get their color. Might be a bit overkill if you can switch out all colors in a few minutes manually though.

    So my question is, how do you deal with color in your game? Do you manually select colors for each object in the inspector or something more complex?
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
  3. ADNCG

    ADNCG

    Joined:
    Jun 9, 2014
    Posts:
    994
    I create a scriptable object that holds as many color fields as needed for a given game and create an instance for every different styles I want.

    I then have a monobehaviour class that holds a list of all the styles. I usually make that class responsible for defining which style is active and fire events when the active style is changed.

    Then I just hook all the objects that need to have their colors changed. That works really well for me. I can re-implement it in like 30 mins for any title.

    Edit : Ah, you meant in the editor. I'm pretty sure it could still be done.
     
    Last edited: May 15, 2020