nodes: use different colors from config based on category
This commit is contained in:
@@ -207,6 +207,11 @@ QColor Color::toQColor() const
|
||||
return c;
|
||||
}
|
||||
|
||||
float Color::GetRoughLuminance() const
|
||||
{
|
||||
return (2*red()+blue()+3*green())/6.0f;
|
||||
}
|
||||
|
||||
const Color &Color::operator+=(const Color &rhs)
|
||||
{
|
||||
for (int i=0;i<kRGBAChannels;i++) {
|
||||
|
||||
@@ -86,6 +86,10 @@ public:
|
||||
|
||||
QColor toQColor() const;
|
||||
|
||||
// Suuuuper rough luminance value mostly used for UI (determining whether to overlay with black
|
||||
// or white text)
|
||||
float GetRoughLuminance() const;
|
||||
|
||||
// Assignment math operators
|
||||
const Color& operator+=(const Color& rhs);
|
||||
const Color& operator-=(const Color& rhs);
|
||||
|
||||
Reference in New Issue
Block a user