OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: vovi on 08 Jan 2005, 15:54:23

Title: colours
Post by: vovi on 08 Jan 2005, 15:54:23
do you know of any colour refrence I can work from?, the colour decimals 1.0,0.6 etc are hard to work out.

Title: Re:colours
Post by: Planck on 08 Jan 2005, 16:44:59
This is for your streetlights?

What colour were you looking for?


Planck
Title: Re:colours
Post by: RujiK on 08 Jan 2005, 20:41:51
Col. Kilnks Radian and Color Utility is perfect for this.
The only problem is I cant remember where I found it  :-\
Id suggest searching some ofp sites for it.
Title: Re:colours
Post by: Lean Bear on 15 Jan 2005, 11:15:09
There is a simple way to work it out:

Quote
This is how the colour values are derived... the RGB palette has originally a range of 0-255 for each channel.  However, in the code form, 0-1 is used instead.

Now let's read the line again,
colorText[]={0.23,0.3,0.08,0.75};

Knowing that, one can easily convert these values to and fro.

  R channel : 0.23/1.00 * 255 = 58.65
  G channel : 0.3/1.00 * 255 = 76.5
  B channel : 0.08/1.00 * 255 = 20.4

I usually round up the numbers.
- Raymond Koh

So, in your picture editing program, if you open up the colour palate, you'll see the boxes for the RGB values and can work them as following:

eg.   R = 59                      59/255 = 0.23
        G = 80     then         80/255 = 0.31
        B =  2                        2/255 = 0 (or 0.007)

And that's how you get your colours. :)