I have read the Wikipedia article about converting from HSV to RGB, but I don't understand. Why is each case option the way it is, and why they are ordered like that, if the order matters?
Asked
Active
Viewed 1,105 times
3
-
Please copy the relevant code into your question. Be specific. I don't want to have to go somewhere else to figure out what you're referring to. – Greg Hewgill Nov 21 '11 at 17:31
-
1You have already asked the same question, and gotten both links and an answer. – Some programmer dude Nov 21 '11 at 17:34
-
I previously asked the question but it seems it was closed for "being a duplicate", I asked it differently since I suppose people are confused about what I am asking. – judeclarke Nov 21 '11 at 17:38
-
Why downvote? It is marked as a "possible duplicated" (which I still contend it is not). The downvote is unwarranted. – judeclarke Nov 21 '11 at 18:25
-
2Voted to reopen. This question asks for an explanation of the algorithm; the others don't ask that. – Rob Kennedy Nov 21 '11 at 18:29
-
1People vote questions down when they're unclear or not useful. Your question obviously wasn't clear, Jude, since at least five people thought it was a duplicate of two other questions. – Rob Kennedy Nov 21 '11 at 18:30
1 Answers
10
Wikipedia outlines a pretty bulletproof approach to coding it, so I'll assume you're confused about the implementation's logic. You're confused about this, correct?
If you look at the image adjacent to it, you will see why:
Each channel's function is a piecewise function consisting of five linear segments. The cases account for each range of each distribution, namely the shaded regions of the above picture.

Blender
- 289,723
- 53
- 439
- 496