[WIP] Keep perceived contrast in random background color
Needs ReviewPublic

Authored by mglb on Apr 5 2019, 12:33 PM.


Group Reviewers

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:


  • Automatically convert old values to new values when color scheme is loaded
  • Adjust defaults
  • Put https://github.com/hsluv/hsluv-c files (without tests) in src/3rdparty/hsluv-c. For now, hsluv.[c,h] are in src.
  • (?) Change "randomize background color" checkbox function to "randomize background and foreground color" (maybe in separate review)

Diff Detail

R319 Konsole
wip/Keep-perceived-contrast-in-random-background-color (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 10460
Build 10478: arc lint + arc unit
mglb requested review of this revision.Apr 5 2019, 12:33 PM
mglb created this revision.
mglb edited subscribers, added: Konsole, VDG; removed: konsole-devel.

Thanks, I agree the colors look much better. This seems like a lot of code for just random backgrounds and I"m not sure how many people use that colorscheme.