diff --git a/qrenderdoc/Code/QRDUtils.cpp b/qrenderdoc/Code/QRDUtils.cpp index 414ad26d8..0bd54f535 100644 --- a/qrenderdoc/Code/QRDUtils.cpp +++ b/qrenderdoc/Code/QRDUtils.cpp @@ -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)); diff --git a/qrenderdoc/Code/QRDUtils.h b/qrenderdoc/Code/QRDUtils.h index e9f2334ee..7f23307c2 100644 --- a/qrenderdoc/Code/QRDUtils.h +++ b/qrenderdoc/Code/QRDUtils.h @@ -892,4 +892,5 @@ void setEnabledMultiple(const QList &widgets, bool enabled); QString GetSystemUsername(); +float getLuminance(const QColor &col); QColor contrastingColor(const QColor &col, const QColor &defaultCol);