Google Answers Logo
View Question
 
Q: HSV to RGB ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: HSV to RGB
Category: Computers > Graphics
Asked by: eksolutions-ga
List Price: $2.00
Posted: 24 Sep 2002 11:43 PDT
Expires: 24 Oct 2002 11:43 PDT
Question ID: 68502
Convert the following HSV triplets to RGB:
(0.2, 0.2, 0.4), (0.2, 0.4, 0.6), (0.6, 0.0, 0.6), (0.2, 0.4, 0.4)
Answer  
Subject: Re: HSV to RGB
Answered By: omnivorous-ga on 24 Sep 2002 13:21 PDT
Rated:5 out of 5 stars
 
Google search strategy:
"HSV converters"
"RGB converters"

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 

This converter's nice because you can visually see the changes in both
formats.  Again be careful in conversions because this RIT tool is
using 0-245 (instead of the standard 0-255) range for RGB.
 
From hue-saturated values to red-green-blue:
(0.2,0.2,0.4) = (0.40,0.42,0.33)
(0.2,0.4,0.6) = (0.56,0.62,0.37)
(0.6,0.0,0.6) = (0.62,0.62,0.62)
(0.2,0.4,0.4) = (0.38,0.42,0.25)

Best regards,

Omnivorous-GA

Request for Answer Clarification by eksolutions-ga on 24 Sep 2002 14:37 PDT
Do you know how to convert HSV to RGB mathematically?

Clarification of Answer by omnivorous-ga on 24 Sep 2002 15:33 PDT
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

Clarification of Answer by omnivorous-ga on 24 Sep 2002 15:44 PDT
EK -- The Exeter presentation that I referenced, "Graphics Standards,"
(January, 2002) is here:
http://www.dcs.ex.ac.uk/~wmilne/graphics/standards.pdf

My apologies for being too quick with the mouse!!

Clarification of Answer by omnivorous-ga on 21 Oct 2002 20:04 PDT
Google and its researchers rely on ratings for a sense of how we're
performing.  Please take the time to rate your question, giving it 5*
if it met your needs!
eksolutions-ga rated this answer:5 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy