Shows all named CSS colors, with a few special features. Covered in complete detail on my site
- color keywords are drawn from a JSON array, which may be useful
- script demonstrates looping through a JSON array, determining luminosity and contrast, and generating elements with
insertAdjacentHTML - alternative English spellings of colors are included, together with
rebeccapurpleandtransparent. (Note thattransparentis not technically a named color, and its alpha hex value -#00000000- is not yet supported in most browsers (browsers currently maptransparenttorgba(0,0,0,0), but the hex value has been used for consistency). - demonstrates even distribution of last-children in a flexbox layout using media queries
A Pen by Dudley Storey on CodePen.