D29502: kwidgetsaddons: Add a named colors support in KColorCombo.
Gustavo Carneiro
noreply at phabricator.kde.org
Mon May 11 13:36:59 BST 2020
araujoluis marked 2 inline comments as done.
araujoluis added inline comments.
INLINE COMMENTS
> cblack wrote in kcolorcombo.cpp:90
> I would probably do what Kirigami does for `ColorUtils::brightnessForColor` here: `((0.299 * color.red() + 0.587 * color.green() + 0.114 * color.blue()) / 255) > 0.5 ? Qt::black : Qt::white`
Done!
> cfeck wrote in kcolorcombo.cpp:89
> Please don't use "value" component to calculate the brightness of a color. #000081 is much darker than #808080. To decide, use qGray(). The threshold also needs to be higher than 128; I use 170, but this mostly depends on correctness of monitor gamma settings.
>
> See https://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color
Done!
REPOSITORY
R236 KWidgetsAddons
REVISION DETAIL
https://phabricator.kde.org/D29502
To: araujoluis, tcanabrava, patrickelectric, hindenburg, ngraham
Cc: cblack, broulik, cfeck, kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200511/fb93fea6/attachment-0001.htm>
More information about the Kde-frameworks-devel
mailing list