Allow small colour changes when varying dark backgrounds
ClosedPublic

Authored by EspadaV8 on Nov 20 2018, 12:42 PM.

Details

Summary

Black backgrounds don't get a (visible) random colour if "Vary the
background colour" has been checked. This is because the only
changes currently made aren't visible if the colour is black. Instead,
if we get a black background allow a small change in the colour
value so that the randomized colour is noticeable.

BUG: 311263
FIXED-IN: 18.12

Test Plan

Create a new profile with a black background and the "Vary the
background colour" option checked. Opening new tabs with this
profile should produce tabs with slightly different background colours.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
EspadaV8 created this revision.Nov 20 2018, 12:42 PM
Restricted Application added a project: Konsole. · View Herald TranscriptNov 20 2018, 12:42 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
EspadaV8 requested review of this revision.Nov 20 2018, 12:42 PM

This will only make changes to backgrounds that are completely black. Setting the background to rgb(1, 0, 0) won't look any different normally, but will also make this appear 'broken'. I was thinking of using hasDarkBackground but that has a much larger range of values (anything < 127). If that's only I can change this to use that method instead.

EspadaV8 edited the summary of this revision. (Show Details)Nov 20 2018, 12:51 PM
EspadaV8 updated this revision to Diff 45882.Nov 20 2018, 12:53 PM

Allow small colour changes when varying dark backgrounds

Black backgrounds don't get a (visible) random colour if "Vary the background
colour" has been checked. This is because the only changes currently made aren't
visible if the colour is black. Instead, if we get a black background allow a
small change in the colour value so that the randomised colour is noticeable.

BUG: 311263

The change appears to be so slight as to be unnoticeable. Only when I change the 48 to 148 can I actually see changes. I would suggest following up on your comment about not just checking for pure black and then also make the change noticeable.

@hindenburg Sounds good. I'll change it to use hasDarkBackground and also change the altered maxValue to 127 (since > 127 would then be a 'light' background colour).

EspadaV8 updated this revision to Diff 45998.Nov 22 2018, 10:25 AM
  • Use hasDarkBackground to decide if we should alter background colour
EspadaV8 updated this revision to Diff 45999.Nov 22 2018, 10:26 AM
  • Use hasDarkBackground to decide if we should alter background colour
hindenburg edited the summary of this revision. (Show Details)Nov 22 2018, 3:10 PM
hindenburg edited the test plan for this revision. (Show Details)
hindenburg accepted this revision.Nov 22 2018, 3:12 PM

Thanks

This revision is now accepted and ready to land.Nov 22 2018, 3:12 PM
This revision was automatically updated to reflect the committed changes.