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,
109 views
Copyright 2021-2024 Baillehache Pascal