Skip to content

All the named css colors as an array of color pairs that meet WCAG AA contrast standards

Notifications You must be signed in to change notification settings

coryzibell/accessible-named-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Accessible Named Colors

WCAG Level AA Compliant Named CSS Colors

I used Cloudflare Design's awesome tool to generate this list:

https://cloudflare.design/color

https://github.com/cloudflare-design/color

Usage

const colors = require('accessibleNamedColors')

or

import colors from 'accessibleNamedColors'

What you get is an array of array pairs of named colors like this:

[
  ['midnightblue', 'violet'],
  ['midnightblue', 'wheat'],
  ['midnightblue', 'white'],
  ['midnightblue', 'whitesmoke'],
  ['midnightblue', 'yellow'],
  ['midnightblue', 'yellowgreen'],
  ['mintcream', 'navy'],
  ['mintcream', 'purple'],
  ['mintcream', 'rebeccapurple']
]

^ That's extremely shortened. The full set is over 1500 pairs.

Important to note that the list is deduped.

So you won't get ['mintcream', 'navy'] and ['navy', 'mintcream']

About

All the named css colors as an array of color pairs that meet WCAG AA contrast standards

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published