Is your text readable on that background? There's a precise, math-backed answer — the WCAG contrast ratio — and you can compute it in ~10 lines. Here's a live checker, no library.
The math (it's exact)
Hex → RGB (0–255 → 0–1).
Linearize each channel (undo sRGB gamma): if c ≤ 0.03928, c/12.92, else ((c+0.055)/1.055)^2.4.
Relative luminance = 0.2126·R + 0.7152·G + 0.0722·B (green is weighted heaviest — your eyes are most sensitive to it).







