Bug 416638 - Dark Background detection is not working
Summary: Dark Background detection is not working
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-23 10:01 UTC by Manuel Rüger
Modified: 2020-02-09 14:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ColorScheme-Fix-DarkBackground-Detection.patch (667 bytes, patch)
2020-01-23 10:01 UTC, Manuel Rüger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rüger 2020-01-23 10:01:45 UTC
Created attachment 125318 [details]
ColorScheme-Fix-DarkBackground-Detection.patch

Commit https://github.com/KDE/konsole/commit/dc29be39a640e9300204f5f1ec676e7b09a2fa08#diff-29f711eecf64b2a15f382213e5b36a77R407
changed the way a dark background is detected in the color scheme.

STEPS TO REPRODUCE
1. Set to dark background
2. Check COLORFGBG variable


OBSERVED RESULT
Dark Background is not detected and COLORFGBG is set to 0;15

EXPECTED RESULT
Dark Background is detected and COLORFGBG is set to 15;0

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Gentoo Linux
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.13.2


I believe the luminance returned by rgb2hsluv is actually between 0 and 100 and not a percentage that is between 0 and 1.
Comment 1 Kurt Hindenburg 2020-02-09 14:36:04 UTC
Nice catch, thanks.
Comment 2 Kurt Hindenburg 2020-02-09 14:45:46 UTC
Fixed in e5b2ada1a6f06e0eea76af1f26ff4c0c4aad8497