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):

and:

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

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