openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.94k stars 2.55k forks source link

ofColor: new getHsb() to retrieve values as glm::vec3 #8006

Closed artificiel closed 2 months ago

artificiel commented 4 months ago

the "getters" in ofColor such as getHue() and getSaturation() return the "got" value as float. however the compound getHsb() want 3 float references. the pattern is not aligned (and not super-OF-typical).

this adds a plain getHsb() that returns a glm::vec3 with native color values, with a companion getNormalizedHsb() for 0..1 values.