https://bugs.documentfoundation.org/show_bug.cgi?id=156182
Heiko Tietze <heiko.tie...@documentfoundation.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |libreoffice-ux-advise@lists | |.freedesktop.org --- Comment #2 from Heiko Tietze <heiko.tie...@documentfoundation.org> --- Most if not all automatic colors are set by checking whether the background is dark. It is implemented in include/tools/color.hxx as bool IsDark() const { // 62 is the number that means it also triggers on Ubuntu in dark mode return GetLuminance() <= 62; } bool IsBright() const { return GetLuminance() >= 245; } And luminance is sal_uInt8((B * 29UL + G * 151UL + R * 76UL) >> 8); I wonder how this luminance value relates to your calculation, that apparently is much better dealing with the contrast. -- You are receiving this mail because: You are the assignee for the bug.