Keep perceived contrast in random background color

Authored by mglb on Aug 17 2019, 8:00 PM.

Description

Keep perceived contrast in random background color

Summary:
Randomize colors using HSLuv color space instead of HSL. It has
perceptually uniform lightness, which means every color with the same
lightness value is perceived as equally bright by humans. Displays
quality and lack of calibration in most monitors lowers this uniformity,
but even on worst color display it should be better than standard HSL.

More information about HSLuv: http://www.hsluv.org/

Minor changes:

  • Random seed takes PID into account to prevent repeated colors in separate Konsole processes
  • Key names in a config were changed
  • Adapted "Black on random light" color scheme

Breeze with random ranges on default bg and fg: hue=360° saturation=100:

To be done in future:

  • Automatically convert color schemes which use old randomization method.

Reviewers: Konsole, VDG

Subscribers: hindenburg, VDG, Konsole

Tags: Konsole, VDG

Differential Revision: https://phabricator.kde.org/D20263