Wikipedia:Manual of Style/Accessibility/Colors

These color tables should help editors choose accessible backgrounds matching various color schemes. The first table contains WCAG AAA compatible for 14 different hues, plus grey and brown. In each row, the "base color" is the simplest representation of the hue. The other colors are derived from the base color by varying its lightness in HSL to achieve the necessary WCAG contrast ratio, which is defined as a ratio of slightly modified CIE relative luminance values.

It is best to choose background colors that offer sufficient contrast in relation to text and blue links, which is also the color of references, both of which are very common in most articles. Use the WCAG link contrast checker to ensure that the chosen background color offers the recommended WCAG AA level of contrast against normal text (#202122) and blue links (#3366CC for the default Vector 2022 skin). WCAG AA is required by various government bodies in the US, EU, UK and Canada.

When links and references are not present, extra contrast is possible by setting the text color to pure black (#000000). If a dark background is desired, it should be used against white text (#FFFFFF) without links or references.

Named web colors
The following web colors are supported by all major browsers since 2005:

Shorthand web colors
Many of these web colors are used as background colors for table cell templates, particularly in the yellow-green-cyan hue range. For the blue-magenta-red range, some of these templates use slightly darker colors to achieve slightly more intense colorfulness in specific cases.

Categorical palettes
The pastel 2 Brewer qualitative palette can be slightly lightened (in HSL color space) to become WCAG AAA compatible with unvisited links, resulting in the following colors:

To use this palette easily, see CellCategory and CategoryBgColor.