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

Reply via email to