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

Function dampColors

plugins/quickopen/expandingtree/expandingdelegate.cpp:46–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46static void dampColors(QColor& col)
47{
48 //Reduce the colors that are less visible to the eye, because they are closer to black when it comes to contrast
49 //The most significant color to the eye is green. Then comes red, and then blue, with blue _much_ less significant.
50
51 col.setBlue(0);
52 col.setRed(col.red() / 2);
53}
54
55//A hack to compute more eye-focused contrast values
56static double readabilityContrast(QColor foreground, QColor background)

Callers 1

readabilityContrastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected