Revision 2a91790...

Go back to digest for 20th October 2013

Features in Development Tools

Milian Wolff committed changes in [kdevplatform] language/highlighting/colorcache.cpp:

Improve detection of dark color schemes for highlighting.

When blending syntax highlighting colors, determine whether the color
scheme is light or dark by comparing the luminance of the background and
the foreground colors, instead of looking only at the foreground color.
The rationale is that what determines whether a color scheme is light or
dark is its background color, and even a dark color scheme can still use a
somewhat grayish foreground color that still provides good contrast, but
is below the original half-luma threshold.

For instance, the popular Solarized Dark color scheme uses #839496 for
its foreground color, which has a luma of 0.287658, well below the 0.5
threshold. This causes KDevelop to incorrectly detect it as a light
color scheme, resulting in dark-on-dark generated syntax highlighting
colors which is very difficult to read. This is fixed by this change.

File Changes

Modified 1 files
  • language/highlighting/colorcache.cpp
1 files changed in total