#!/usr/bin/env bash # check-contrast.sh — WCAG AA contrast ratio checker for theme tokens. # Parses variables.css for dark/light token pairs, checks text-on-background contrast. # Usage: bash scripts/check-contrast.sh [variables.css] set -euo pipefail CSS_FILE="${1:-src/css/variables.css}" # Verify python3 is available if ! command -v python3 &>/dev/null; then echo "ERROR: python3 required for luminance computation" >&2 exit 1 fi # ── Extract tokens from a CSS block ───────────────────── # Usage: extract_tokens