Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Colour Query

Discussion in 'External Tools' started by AaronC, Feb 16, 2007.

  1. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,544
    Hey,

    In Photoshop, colours are measured in 0-255 type measurements, and Unity does it in a 0.0-1.0 style. Is there a way to translate photoshop colour info to unity info?

    I find that making colours by scripting and guessing the numbers between 0 and 1 to get a nice one is hit and miss and miss and miss. If The unity colour selector had little numbers saying what my colour choice was in terms of 0.0 to 1.0 measurements, that would help. Or am I missing an obvious way of doing this?

    Thank you
    AC
     
  2. davidpolcino

    davidpolcino

    Joined:
    Feb 2, 2006
    Posts:
    65
    Divide by 256 I believe. So you want color value 128:
    128/256

    [corrected]
     
  3. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,648
    divide by 256 - zero counts...
     
  4. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,544
    Cool, Im diggin it. I knew there had to be some straightforward approach. Thanks
    AC