https://bugs.documentfoundation.org/show_bug.cgi?id=149934
Bug ID: 149934
Summary: ACCESSIBILITY - Constant Colors Fail WCAG 2.1 Contrast
Ratio
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: UI
Assignee: [email protected]
Reporter: [email protected]
LO default colors fail WCAG 2.1 contrast ratio, for example, the colors used in
the macro IDE:
https://github.com/LibreOffice/core/blob/master/svtools/source/config/colorcfg.cxx#L447-L453
* default colors eg
https://github.com/LibreOffice/core/blob/master/svtools/source/config/colorcfg.cxx#L406-L461
* color types constants:
https://github.com/LibreOffice/core/blob/e4a57dcdabc9ae7d381025e008b90635c1b7b10c/include/tools/color.hxx#L448-L499
The IDE uses default colors which mainly fail as shown using
https://webaim.org/resources/contrastchecker/?fcolor=000000&bcolor=FFFFFF&api
(replace fcolor and bcolor as required). The required ratio varies but starts
at 4.5:
* COL_BLUE 00 00 80 - 000080
{"ratio":"16.0","AA":"pass","AALarge":"pass","AAA":"pass","AAALarge":"pass"}
* COL_GREEN 00 80 00 - 008000
{"ratio":"5.13","AA":"pass","AALarge":"pass","AAA":"fail","AAALarge":"pass"}
* COL_RED 80 00 00 - 800000
{"ratio":"10.9","AA":"pass","AALarge":"pass","AAA":"pass","AAALarge":"pass"}
* COL_GRAY 80 80 80 - 808080
{"ratio":"3.94","AA":"fail","AALarge":"pass","AAA":"fail","AAALarge":"fail"}
* COL_LIGHTRED FF 00 00 - FF0000
{"ratio":"3.99","AA":"fail","AALarge":"pass","AAA":"fail","AAALarge":"fail"}
These colors are carried through into the guides and other documentation.
====================
Suggested:
* tweak colors so they comply with WCAG 2.1
* eg red: #FF0000 -> #EE0000, grey: #808080 -> #696969
* take the opportunity to change constant color names and values to html colors
====================
The actual colors defined by the lo variables are often unexpected because they
tend to be darker than similar color names used by html.
Lo_Color HTML
#000000 Col_Black = Black
#000080 Col_Blue * Navy
#008000 Col_Green = Green
#008080 Col_Cyan Teal
#800000 Col_Red * Maroon
#800080 Col_Magenta Purple
#808000 Col_Brown Olive
#808080 Col_Gray = Gray
#CCCCCC Col_Gray3
#D3D3D3 LightGray
#666666 Col_Gray7
#696969 DimGray
#C0C0C0 Col_Lightgray Silver
#0000FF Col_Lightblue * Blue
#00FF00 Col_Lightgreen Lime
#00FFFF Col_Lightcyan Aqua
#FF0000 Col_Lightred * Red
#FF00FF Col_Lightmagenta Fuschia
#E0E0FF Col_Lightgrayblue
#E6E6FA Lavender
#FFFF00 Col_Yellow = Yellow
#FFFFFF Col_White = White
19 Total
4 * Conflict
5 = Match
7 Different
3 Unnamed
Lo_Color constants changed to mixed case for readability
--
You are receiving this mail because:
You are the assignee for the bug.