You can use this tool to find colours that have sufficient contrast. Simply enter the colour values in the input fields to display the colour contrast, then use the sliders to adjust the colours if necessary.
The height of each slider indicates the contrast: full height is used for colours that have sufficient contrast, so you can easily see how far to move the slider.
Example
Below is a screen shot of green text colour rgb(40,240,47) on a yellow background colour rgb(238,255,0). The sliders represent the green colour and show that there is insufficient contrast. They also show that if you move the first slider into the blue area, there will be sufficient contrast (because here the slider has full height).
In the screen shot below, the first slider has been moved into the blue area. As the slider is moved the other two sliders change height and colour to reflect the new value.
HEX and RGB input
Press the "H/R" button to switch the display of text and background colour values between Hexadecimal notation and RGB notation:
The values are in the same notation as used in CSS style sheets so they can be easily pasted to and from CSS.
You can type a value directly in the fields to update the colour. The value gets interpreted as you type. Invalid entries are corrected when you press the Enter key or move focus away from the input field.
Lazy typing
If you type a value that starts with "#" it will be interpreted as a HEX value, regardless of the HEX/RGB setting. If the value starts with "r" it will be interpreted as an RBG value.
The input fields also allow for "lazy typing", e.g. if you type "40 20 40" in RGB mode it will be accepted as rgb(40,20,40).
Clipboard access
The button with the left-pointing arrow pastes colour values from the clipboard. If the clipboard contains text and if the text includes colour values in hex or rgb format, the values will be inserted in the input fields.
The button with the right-pointing arrow copies the current colour values and the colour contrast to the clipboard, for example "#288CF0 #0F2A05 4.5".
For example, if you use the
Colour Contrast Analyser
, press Ctrl + S to copy the results, then use the paste function in the Colour Contrast Determinator to paste the results into the two input fields.
Slider settings
The sliders represent one colour and can either display the text colour or the background colour. This is specified by the first pair of radio buttons.
Sliders controlling text colour:
Sliders controlling background colour:
The second pair of radio buttons specifies if the sliders indicate colour contrast for text or for large text. Changing the values of these buttons only changes the height of the sliders. In the screen shot below, the sliders show colour contrast for large text. The large text requirement is easier to meet, so a bigger portion of the sliders now has full height (because more colours pass the requirement).
Clicking to the left of a slider thumb moves the thumb one unit to the left, clicking on the right moves to the right.
Colour contrast
Apart from slider height, the colour contrast is given as a number, e.g. "5.3", and status is indicated in text, for example "Pass for text". The value "5.3" corresponds to the more formal notation of "5.3:1".
Accessibility
The Colour Contrast Determinator contains text alternatives for screen reader users. For example, the text alternative for the hue slider might be "Hue values 0 to 217 fail. Values 218 to 285 pass. Values 286 to 360 fail".
Keyboard accessibility is provided for the sliders as the Up and Down Arrow keys move the value by one slider unit, and the Left and Right Arrow keys move the value by bigger increments.
Techinal note
The sliders are created with SVG and provide alternative text via screen reader-only text.
Colour contrast requirements
The Web Content Accessibility Guidelines (WCAG) 2.1 stipulate that text colours and colours of informative graphics (e.g. icons, checkboxes, radio buttons, graphs), must have sufficient colour contrast against background colours. This makes it easier for low vision users - and users in general - to read text and recognise shapes.
The colour contrast is measured by feeding the RGB values for the text colour and the background colour into an equation. If the output is 3.0 or more the contrast is sufficient for large text and graphics. If the output is 4.5 or more the contrast is sufficient for standard text. Large text is defined as minimum 18pt or minimum 14pt if bold.
Terms of Use
This software is being provided "as is" - without any express or implied warranty. In particular, me2 Accessibility does not make any representation or warranty of any kind concerning the reliability, quality, or merchantability of this software or its fitness for any particular purpose. In addition, me2 Accessibility does not guarantee that use of this tool will ensure the accessibility of your web content or that your web content will comply with any specific accessibility standard.