Add toGrayscale

This commit is contained in:
Phillip Stephens 2016-01-04 23:49:12 -08:00
parent 3d6218a9d2
commit 0ec87939d2
1 changed files with 3 additions and 0 deletions

View File

@ -294,6 +294,9 @@ public:
void fromHSL(float h, float s, float l, float _a = 1.0); void fromHSL(float h, float s, float l, float _a = 1.0);
void toHSL(float& h, float& s, float& l); void toHSL(float& h, float& s, float& l);
CColor toGrayscale()
{ return {Math::sqrtF(magSquared() / 3)}; }
}; };
static inline CColor operator+(float lhs, const CColor& rhs) static inline CColor operator+(float lhs, const CColor& rhs)