Conversion RGB-HSV

Memo for myself: how to convert from/to RGB and HSV. It is explained on this Wikipedia page, and can be implemented in C as follow (given equalf, modulof are respectively the equality and modulo operators for floating point values):


If you want to know more about other color spaces, read this article.

in All, C programming, Computer graphics,
I'm open for work ! Check my profile and email me.
Liked this article ? Please consider supporting me:
Copyright 2021-2023 Baillehache Pascal