Wikipedia:Manual of Style/Accessibility/CSS colors for text on white

From Wikipedia, the free encyclopedia

For colored text against a white background, the following named CSS colors meet the minimum contrast ratio (4.5:1) specified by Web Content Accessibility Guidelines (WCAG) 2.0 Level AA: (technically these same colors could be used for white text against a colored background; this does not take into account other text colors like links.)

More information Contrast, Color sample ...
Contrast[a]Color sampleColor name (bolded)HexAAA[b]
21Black#000000 or #000Yes
16.009Navy#000080Yes
15.297DarkBlue#00008BYes
14.847MidnightBlue#191970Yes
12.95Indigo#4B0082Yes
11.16MediumBlue#0000CDYes
10.949Maroon#800000Yes
10.01DarkRed#8B0000Yes
9.418Purple#800080Yes
9.067DarkSlateBlue#483D8BYes
8.927DarkSlateGray#2F4F4FYes
8.927DarkSlateGrey#2F4F4FYes
8.592Blue#0000FF or #00FYes
8.528(none) [c]#0645ADYes
8.499DarkMagenta#8B008BYes
8.405RebeccaPurple#663399 or #639Yes
7.439DarkGreen#006400Yes
7.098SaddleBrown#8B4513Yes
7.083Brown#A52A2AYes
6.677FireBrick#B22222No
6.562DarkViolet#9400D3No
5.958BlueViolet#8A2BE2No
5.948DarkOliveGreen#556B2FNo
5.702DarkOrchid#9932CCNo
5.615Sienna#A0522DNo
5.489DimGray#696969No
5.489DimGrey#696969No
5.42MediumVioletRed#C71585No
5.307SlateBlue#6A5ACDNo
5.137Green#008000No
4.989Crimson#DC143CNo
4.846RoyalBlue#4169E1No
4.773Teal#008080No
Close

For text against a white background, the following CSS colors do not meet the minimum contrast ratio (4.5:1) specified by Web Content Accessibility Guidelines (WCAG) 2.0 Level AA, when compared against a default light-colored background. Some of them may have high contrast ratios against certain background colors (e.g., white text on a black background).

More information Contrast, Color sample ...
Contrast[d]Color sampleColor nameHex
4.389ForestGreen#228B22
4.245SeaGreen#2E8B57
4.195Olive#808000
4.152MediumSlateBlue#7B68EE
4.145DarkCyan#008B8B
4.107SteelBlue#4682B4
4.054SlateGray#708090
4.054SlateGrey#708090
3.998Red#FF0000 or #F00
3.976IndianRed#CD5C5C
3.949Gray#808080
3.949Grey#808080
3.941MediumOrchid#BA55D3
3.805OliveDrab#6B8E23
3.762MediumPurple#9370DB
3.642LightSlateGray#778899 or #789
3.642LightSlateGrey#778899 or #789
3.637DeepPink#FF1493
3.633Chocolate#D2691E
3.44OrangeRed#FF4500
3.254DarkGoldenrod#B8860B
3.236DodgerBlue#1E90FF
3.136Fuchsia#FF00FF or #F0F
3.136Magenta#FF00FF or #F0F
3.11PaleVioletRed#DB7093
3.05CadetBlue#5F9EA0
2.99Peru#CD853F
2.972CornflowerBlue#6495ED
2.946Tomato#FF6347
2.888Orchid#DA70D6
2.813RosyBrown#BC8F8F
2.665MediumSeaGreen#3CB371
2.647HotPink#FF69B4
2.621LightSeaGreen#20B2AA
2.591LightCoral#F08080
2.501Salmon#FA8072
2.498Coral#FF7F50
2.35DarkGray#A9A9A9
2.35DarkGrey#A9A9A9
2.332DarkOrange#FF8C00
2.317Violet#EE82EE
2.305DarkSalmon#E9967A
2.237Goldenrod#DAA520
2.152DarkSeaGreen#8FBC8F
2.122DeepSkyBlue#00BFFF
2.118LimeGreen#32CD32
2.069DarkKhaki#BDB76B
2.069Plum#DDA0DD
2.033SandyBrown#F4A460
1.988LightSalmon#FFA07A
1.974Orange#FFA500
1.972Tan#D2B48C
1.953DarkTurquoise#00CED1
1.93MediumAquamarine#66CDAA
1.882YellowGreen#9ACD32
1.863MediumTurquoise#48D1CC
1.856BurlyWood#DEB887
1.819Silver#C0C0C0
1.78LightSteelBlue#B0C4DE
1.741SkyBlue#87CEEB
1.715LightSkyBlue#87CEFA
1.698Thistle#D8BFD8
1.651LightPink#FFB6C1
1.641Turquoise#40E0D0
1.537Pink#FFC0CB
1.528LightBlue#ADD8E6
1.496LightGray#D3D3D3
1.496LightGrey#D3D3D3
1.433PowderBlue#B0E0E6
1.417LightGreen#90EE90
1.402Gold#FFD700
1.386MediumSpringGreen#00FA9A
1.372Lime#00FF00 or #0F0
1.371Gainsboro#DCDCDC
1.345SpringGreen#00FF7F
1.33LawnGreen#7CFC00
1.314PeachPuff#FFDAB9
1.313Wheat#F5DEB3
1.295Chartreuse#7FFF00
1.289PaleTurquoise#AFEEEE
1.288NavajoWhite#FFDEAD
1.28Khaki#F0E68C
1.266PaleGreen#98FB98
1.253Aqua#00FFFF or #0FF
1.253Cyan#00FFFF or #0FF
1.253PaleGoldenrod#EEE8AA
1.234Moccasin#FFE4B5
1.23Lavender#E6E6FA
1.226GreenYellow#ADFF2F
1.224Bisque#FFE4C4
1.223Aquamarine#7FFFD4
1.204MistyRose#FFE4E1
1.171AntiqueWhite#FAEBD7
1.165BlanchedAlmond#FFEBCD
1.131PapayaWhip#FFEFD5
1.124Linen#FAF0E6
1.106Beige#F5F5DC
1.103LavenderBlush#FFF0F5
1.09WhiteSmoke#F5F5F5
1.083OldLace#FDF5E6
1.074SeaShell#FFF5EE
1.073Yellow#FFFF00 or #FF0
1.072AliceBlue#F0F8FF
1.067LightGoldenrodYellow#FAFAD2
1.065Cornsilk#FFF8DC
1.06LemonChiffon#FFFACD
1.057GhostWhite#F8F8FF
1.054LightCyan#E0FFFF
1.04FloralWhite#FFFAF0
1.036Honeydew#F0FFF0
1.034Snow#FFFAFA
1.026Azure#F0FFFF
1.021MintCream#F5FFFA
1.017LightYellow#FFFFE0
1.008Ivory#FFFFF0
1White#FFFFFF or #FFF
Close

Notes

  1. Contrast against white, from Snook's Colour Contrast Check. Omits the :1 for simplicity (and numerical sortability), so n represents n:1.
  2. Indicates whether the color meets the minimum contrast ratio (7:1) specified by WCAG 2.0 Level AAA.
  3. Default unvisited-link color for Wikipedia's Vector skin, as of May 2019. Sources: Help:Link color and
  4. Contrast against white, from Snook's Colour Contrast Check. Omits the :1 for simplicity (and numerical sortability), so n represents n:1.

Related Articles

Wikiwand AI