Important! Please read the announcement at http://myst.dustbird.net/uru-account.htm
Also! Please read the retirement announcement at http://myst.dustbird.net/uru-retirement.htm

Colors

From UamWiki
Revision as of 20:55, 5 January 2011 by Dustin (talk | contribs) (Created page with 'Colors are specified a few different ways in Uru. But they all look like 3 values, one for red, one for green, and one for blue. =As Integers= These are specified as 3 numbers …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Colors are specified a few different ways in Uru. But they all look like 3 values, one for red, one for green, and one for blue.

As Integers

These are specified as 3 numbers from 0 to 255. E.g. 101,37,250

As Hex

These are just like the integers, but in Hexadecimal. You can use this page to convert: http://www.statman.info/conversions/hexadecimal.html

In this case the (101,37,250) becomes (64,25,FA)

Note that sometimes you can't tell (just by looking at it) if a number is a regular decimal integer, or in hex form.

As Floats

These are specified as a decimal point number between 0.0 and 1.0.

To convert from integers to floats, divide each number by 255. So in our example, (101,37,250)->(101/255,37/255,250/255)->(0.40,0.15,0.98)

To convert from floats to integers, multiply each number by 255. So (0.2,0.87,0.1)->(0.2*255,0.87*255,0.1*255)->(51,222,196)