https://bugs.documentfoundation.org/show_bug.cgi?id=158989

--- Comment #9 from Heiko Tietze <[email protected]> ---
(In reply to Luke Deller from bug 61993 comment 3)
> Word 2010 appears to treat a background colour as "dark" if:
> 130*red + 255*green * 51*blue < 105*255

My first patch used the w3 algorithm from
https://www.w3.org/TR/AERT/#color-contrast
return sal_uInt8((R * 299UL + G * 587UL + B * 114UL) / 1000);

with IsDark() GetRelativeLuminance() <= 128; and IsBright()
GetRelativeLuminance() >= 200;

Don't remember why I rejected this solution, maybe because of this reply:
(In reply to Myndex from comment #6)
> Case 5 is an obsolete and incorrect WCAG 1.0 attempt at something...

The alleged MSO function makes no difference to what we had in the past. But if
I use a black cell background in Excel 365 the automatic font color is still
black. Don't want to fix their problems, though.

By the way, the default color Tango Sky Blue / 0x729fcf is calculated extra
with the legacy calculation.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to