D29502: kwidgetsaddons: Add a named colors support in KColorCombo.
Carson Black
noreply at phabricator.kde.org
Mon May 11 02:00:53 BST 2020
cblack added inline comments.
INLINE COMMENTS
> kcolorcombo.cpp:90
> + innerColor.getHsv(&unused, &unused, &v);
> + textColor = v > 128 ? Qt::black : Qt::white;
> + }
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`
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/b1a8cdc8/attachment.htm>
More information about the Kde-frameworks-devel
mailing list