There are a number of applets that convert color types on the
Internet. This "Color Space Conversion Applet" at Rochester Institute
of Technology's site handles RGB, HSV, CIE and YIQ:
http://www.cs.rit.edu/~ncs/color/a_spaces.html
You'll need to convert the decimal RGB values to a 0-245 (not the
standard 0-255 scale for RGB) scale but here's what you get:
(0.2,0.3,0.4) = (0.58,0.50,0.38)
(0.2,0.4,0.6) = (0.58,0.66,0.57)
(0.6, 0.1, 0.6) = (0.83,0.83,0.57)
(0.2, 0.4, 0.4) = (0.50,0.50,0.38)
Best regards,
Omnivorous-GA |
Clarification of Answer by
omnivorous-ga
on
24 Sep 2002 15:34 PDT
(Note that the same resources are posted on the HSV-RGB conversion
question . . .)
The most-concise definition of HSV as a function of RGB is at the
Exeter School of Engineering and Computer Science site, which notes
that "there is no simple formula" for the conversion of RGB to HSV.
Instead, hue-saturation- can be expressed this way, according the
the presentation, "Graphics Standards," (January, 2002):
V = max (r,g,b)
S = (max (r,g,b)) - min (r,g,b)/max (r,g,b)
H = depends on which of r,g,b is the maximum
The Association for Computing machinery RGB-HSV and HSV-RGB
conversions (written in C) are in this paper "The HSV-RGB Transform
Pair" (undated):
http://www.acm.org/jgt/papers/SmithLyons96/hsv_rgb.html
Compaq/DEC have similar routines on this color definition page written
by Stolfi (March, 1988)
http://research.compaq.com/SRC/m3sources/html/color/src/Color.i3.html
EFG Computer labs model has yet a third C code routine for going from
HSV-to-RGB or RGB-to-HSV:
http://plum.ia.polsl.gliwice.pl/~DIP/efg/Graphics/Colors/HSV.htm
Good luck!
Omnivorous-GA
|