ntno / mkdocs-terminal

monospace theme for MkDocs
https://ntno.github.io/mkdocs-terminal/
MIT License
96 stars 3 forks source link

review existing palettes for color contrast #120

Open ntno opened 1 year ago

ntno commented 1 year ago

check existing palettes to see which conform to WCAG contrast guidelines

tasks:

cowellbunga commented 1 day ago

Summary

I wrote a script that reviews the existing palettes to determine alignment with WCAG guidelines, based on identified foreground and background colors.

In general, most palette foreground colors that contain fg, foreground, or primary pass the WCAG tests with the default palette backgrounds. There are some exceptions. Other color types vary in terms of WCAG alignment.

Steps

  1. Identify the background and foreground colors based on simple keywords (ex: property name contains "background")
  2. Check each background-foreground combo for WCAG alignment
  3. Report results in an html table

Notes

Legend

dark.css

backgrounds primary-color (62c4ff) secondary-color (a3abba) tertiary-color (a3abba) font-color (e8e9ed) error-color (ff3c74)
background-color (222225) :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check:
progress-bar-background (3f3f44) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check:
code-bg-color (3f3f44) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check:

gruvbox_dark.css

< < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < <
backgrounds gb-dm-dark-blue (458588) gb-dm-dark-aqua (689d6a) gb-dm-light-blue (83a598) gb-dm-light-aqua (8ec07c) gb-dm-dark-gray (928374) gb-dm-dark-green (98971a) gb-dm-fg4 (a89984) gb-dm-light-gray (a89984) gb-dm-dark-purple (b16286) gb-dm-light-green (b8bb26) gb-dm-fg3 (bdae93) gb-dm-dark-red (cc241d) gb-dm-light-purple (d3869b) gb-dm-fg2 (d5c4a1) gb-dm-dark-orange (d65d0e) gb-dm-dark-yellow (d79921) gb-dm-fg1 (ebdbb2) gb-dm-light-orange (f38019) gb-dm-light-yellow (fabd2f) gb-dm-light-red (fb4934) gb-dm-fg0 (fbf1c7)
gb-dm-bg0-hard (1d2021) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :white_check_mark::x: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :white_check_mark:
gb-dm-bg0 (282828) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check::x: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :white_check_mark:
gb-dm-bg0-soft (32302f) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :white_check_mark:
gb-dm-bg1 (3c3836):x: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark:
gb-dm-bg2 (504945):x::x: :ballot_box_with_check: :ballot_box_with_check::x::x: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :ballot_box_with_check::x: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check::x: :white_check_mark:
gb-dm-bg3 (665c54):x::x::x: :ballot_box_with_check::x::x::x::x::x: :ballot_box_with_check::x::x::x: :ballot_box_with_check::x::x: :ballot_box_with_check::x: :ballot_box_with_check::x: :ballot_box_with_check:
gb-dm-bg4 (7c6f64):x::x::x::x::x::x::x::x::x::x::x::x::x::x::x::x: :ballot_box_with_check::x::x::x: :ballot_box_with_check:

pink.css

<
backgrounds font-color (190910) secondary-color (715864) tertiary-color (715864) error-color (bb0047) primary-color (f90d7a)
progress-bar-background (d4d4d4) :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check::x:
code-bg-color (f7f7f7) :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check:
background-color (ffffff) :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check:

sans.css

sans_dark.css

backgrounds primary-color (62c4ff) secondary-color (a3abba) tertiary-color (a3abba) font-color (e8e9ed) error-color (ff3c74)
background-color (222225) :white_check_mark: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check:
progress-bar-background (3f3f44) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check:
code-bg-color (3f3f44) :ballot_box_with_check: :ballot_box_with_check: :ballot_box_with_check: :white_check_mark: :ballot_box_with_check: