Expose getLuminance for QColor

This commit is contained in:
baldurk
2017-07-14 17:17:54 +01:00
parent 0aad2e9c03
commit acae04af02
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -1061,7 +1061,7 @@ QString GetSystemUsername()
return username;
}
static float getLuminance(const QColor &col)
float getLuminance(const QColor &col)
{
return (float)(0.2126 * qPow(col.redF(), 2.2) + 0.7152 * qPow(col.greenF(), 2.2) +
0.0722 * qPow(col.blueF(), 2.2));