MCPcopy Create free account
hub / github.com/baldurk/renderdoc / getLuminance

Function getLuminance

qrenderdoc/Code/QRDUtils.cpp:3475–3479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3473}
3474
3475float getLuminance(const QColor &col)
3476{
3477 return (float)(0.2126 * qPow(col.redF(), 2.2) + 0.7152 * qPow(col.greenF(), 2.2) +
3478 0.0722 * qPow(col.blueF(), 2.2));
3479}
3480
3481QColor contrastingColor(const QColor &col, const QColor &defaultCol)
3482{

Callers 3

IsDarkThemeFunction · 0.85
contrastingColorFunction · 0.85
paintEventMethod · 0.85

Calls 1

qPowFunction · 0.85

Tested by

no test coverage detected