RGB for HSB algorithm

Possible duplicate:
Algorithm for converting RGB to HSV and HSV to RGB?

I am trying to find an algorithm (prefferabley presented in C ++) that converts RGB values ​​to HSB so that I can handle it accordingly. Anyone have any suggestions?

+6
source share
2 answers

This is java, not C ++, but it should be close enough so that it can be easily reused. Find the RGBtoHSB method on this page:

http://www.docjar.com/html/api/java/awt/Color.java.html

+5
source

There, several color algorithms are demonstrated here , including the one you need that is worth reading.

+2
source

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


All Articles