Why does the HSV-RGB algorithm work the way it does?

I read a Wikipedia article about converting from HSV to RGB , but I do not understand. Why is each variant of the case the way it is, and why are they ordered in this way, if order matters?

+3
source share
1 answer

Wikipedia describes a rather bulletproof approach to coding it, so I assume you are confused about the implementation logic. You are embarrassed by this, right?

enter image description here

If you look at the image next to it, you will see why:

enter image description here

Each channel function is a piecewise function consisting of five linear segments. The cases take into account each range of each distribution, namely the shaded areas of the above image.

+10
source

Source: https://habr.com/ru/post/902114/


All Articles