mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-14 18:00:54 +00:00
Expose getLuminance for QColor
This commit is contained in:
2 files changed
+2
-1
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user