I'm puzzled. For a project, I need to calculate the hue of a color from its rgb values. I've found a few different methods to do this, and coded up two of them. They return consistent results, and agree with online calculators I've found. So far, so good.
But then I opened up the Flash CS4 color panel, to quickly look up colors, and found that it uses different hue values. And I'm wondering why?
When I plug an RGB value like (153, 153, 255) into my code, I get back a Hue value of 240. Those same values in the Flash color panel gives a different value for Hue (160).
This has got my curiosity truly piqued. I was hoping to be able to post an answer, but I haven't had any luck finding one yet.
Tuesday, March 24, 2009
Subscribe to:
Post Comments (Atom)


1 comments:
That's because that's Windows genious color selection palette that date back to the Windows 3 days (it's not Flash's), and on it, Hue, for some odd reason, go from 0 to 240 instead of 0 to 360.
windows_hue / 240 * 360 = real_hue
So,
160 / 240 * 360 = 240
Just ignore that value. It's not used anywhere.
Post a Comment