We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
hexadecimal notation (Read 990 times)
hexadecimal notation
Oct 12th, 2006, 11:07pm
 
in 0119-

When creating a color in hex notation, I'm needing to specify:
#FF8800 or 0xFFFF8800, but not 0xFF8800.

It's no big deal accounting for the alpha component, but the reference seems to imply that you should be able to just specify: 0xFF8800:

Quote:
"...Color can also be created using hexadecimal notation. For example, "color(0, 102, 153)" is equivalent to "color(#006699)" and "color(0x006699)"
..."

Re: hexadecimal notation
Reply #1 - Oct 12th, 2006, 11:15pm
 
the reference is incorrect, it should read:

For example, "color(0, 102, 153)" is equivalent to "color(#006699)" and "color(0xFF006699)".

although i wonder if that's how it should be explained, since there isn't really a need to use color() on it when it's a hex color already. i.e.:

color c = #006699;

makes better sense (and is faster than)

color c = color(#006699).

(moving this to the reference bugs area so casey can have a look)
Page Index Toggle Pages: 1