MCPcopy Create free account
hub / github.com/KDE/kdevelop / canBlendForegroundColor

Function canBlendForegroundColor

kdevplatform/util/widgetcolorizer.cpp:124–128  ·  view source on GitHub ↗

* Blending is used for non white (colorful?) colors to increase contrast (get a brighter color). * Inverting is not possible for non white/black colors and would just create a different color * not guaranteed to be brighter. */

Source from the content-addressed store, hash-verified

122 * not guaranteed to be brighter.
123 */
124bool canBlendForegroundColor(const QColor& color)
125{
126 // a foreground color with other hsv values will give bad contrast against a dark background
127 return color.valueF() < 0.7;
128}
129
130bool isBrightBackgroundColor(const QColor& color)
131{

Callers 1

collectRangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected