Add WCAG AAA colour contrast option to theme editor#2282
Conversation
This reverts commit 3e3dd57.
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
size-limit report 📦
|
HiDeoo
left a comment
There was a problem hiding this comment.
What a lovely PR, really amazing addition to the theme editor 👏
Co-Authored-By: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Co-Authored-By: HiDeoo <494699+HiDeoo@users.noreply.github.com>
* main: (37 commits) [ci] format i18n(ko-KR): update `manual-setup.mdx` (withastro#2294) i18n(ko-KR): update `configuration.mdx` (withastro#2295) [ci] release (withastro#2292) Add support for SSR (withastro#1255) Add Markdoc preset and example (withastro#2249) Refactor sidebar persistence logic for better slow device performance (withastro#2242) [ci] format Add docs.ryzekit.com to showcase (withastro#2291) Update astro dependency to 4.15.3 across monorepo (withastro#2289) [ci] release (withastro#2290) Prevent Zod errors from crashing build (withastro#2288) i18n(fr): update `guides/css-and-tailwind` (withastro#2286) i18n(ko-KR): update `css-and-tailwind.mdx` (withastro#2284) Add WCAG AAA colour contrast option to theme editor (withastro#2282) [ci] release (withastro#2283) Parse `<StarlightPage />` frontmatter asynchronously (withastro#2279) Ensure unhandled directives are restored without any extra whitespace (withastro#2281) i18n(fr): update `resources/plugins` (withastro#2278) i18n(ko-KR): update `plugins.mdx` (withastro#2277) ...

Description
getPalettes()function used to generate a colour palette now takes a minimum contrast to enforce and uses it for the shades which are currently marginal (pass AA requirements but not AAA).culori’swcagContrast()method. I used that to compute a contrast and then colours without sufficient contrast have their luminance incremented/decremented in 0.5% steps until the contrast requirement is met.Browser testing
Tested on macOS with:
Tested on Android with: