RGB to HSB Algorithm
17,300
Solution 1
It's java and not C++ but it should be close enough to be easily reusable. Look for the RGBtoHSB
method in this page:
http://www.docjar.com/html/api/java/awt/Color.java.html
Solution 2
There's a number of colour algorithms demonstrated here, including the one you require which would be worth reading.
Author by
user965369
I'm an Android and iOS App Developer. Also love a bit of Zend from time-to-time.
Updated on June 21, 2022Comments
-
user965369 almost 2 years
Possible Duplicate:
Algorithm to convert RGB to HSV and HSV to RGB?I'm trying to find an algorithm (prefferabley represented in C++) that converts from RGBto HSB values so that I can process it accordingly. Anyone got any suggestions?