Reputation: 1116
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?
Upvotes: 3
Views: 1129
Reputation: 298156
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.
Upvotes: 10