Switch default accent to deep teal

This commit is contained in:
2026-06-05 13:41:34 +03:00
parent cc0814a596
commit 29217aefcf
3 changed files with 63 additions and 33 deletions
+4 -3
View File
@@ -105,9 +105,10 @@ UI by swapping one set of values. Borrowed from Carbon's layering model:
| `--support-error / -success / -warning / -info` | Status only — color = meaning |
- **Neutrals** use the Carbon gray ramp (`#f4f4f4#161616`) — accessible and
legible. **Accent and theming are open**: the specimen ships several accents
(indigo, teal, amber, rose) and light/dark themes to prove the system is free,
not blue-bound. Pick, add, or invent themes freely.
legible. **Accent and theming are open**: the default accent is **deep teal**
(`#0e7490` / dark `#2dd4bf`), with opt-in alternates (blue, indigo, amber, rose)
and light/dark themes to prove the system is free, not blue-bound. Pick, add, or
invent themes freely.
- **Status palette** (borrowed, stable): error `#da1e28`, success `#198038`,
warning `#f1c21b`, info `#0043ce` — tuned per theme for contrast.
- **Contrast:** target WCAG AA (4.5:1 text, 3:1 large/UI). Accent-on-`--bg` and
+36 -18
View File
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" data-theme="light" data-accent="indigo">
<html lang="en" data-theme="light" data-accent="teal">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -87,17 +87,23 @@
--on-status: #161616;
}
/* --- Accent: the FREE, swappable layer (theme-aware) --- */
/* --- Accent: the FREE, swappable layer (theme-aware). Deep teal is the
default; see styles/tokens.css for the shipped source of truth. --- */
[data-accent='teal'] {
--accent: #0e7490;
--accent-hover: #0c5f77;
--accent-contrast: #fff;
}
[data-accent='blue'] {
--accent: #0f62fe;
--accent-hover: #0353e9;
--accent-contrast: #fff;
}
[data-accent='indigo'] {
--accent: #5b54e6;
--accent-hover: #4a43d6;
--accent-contrast: #fff;
}
[data-accent='teal'] {
--accent: #0f766e;
--accent-hover: #0c5f59;
--accent-contrast: #fff;
}
[data-accent='amber'] {
--accent: #b45309;
--accent-hover: #92400e;
@@ -109,16 +115,21 @@
--accent-contrast: #fff;
}
/* Brighter accents on the dark canvas (compound selector wins on specificity) */
[data-theme='dark'][data-accent='indigo'] {
--accent: #8b85f0;
--accent-hover: #a29bf5;
--accent-contrast: #161616;
}
[data-theme='dark'][data-accent='teal'] {
--accent: #2dd4bf;
--accent-hover: #5eead4;
--accent-contrast: #161616;
}
[data-theme='dark'][data-accent='blue'] {
--accent: #78a9ff;
--accent-hover: #a6c8ff;
--accent-contrast: #161616;
}
[data-theme='dark'][data-accent='indigo'] {
--accent: #8b85f0;
--accent-hover: #a29bf5;
--accent-contrast: #161616;
}
[data-theme='dark'][data-accent='amber'] {
--accent: #fbbf24;
--accent-hover: #fcd34d;
@@ -785,17 +796,24 @@
<div class="row" id="accent" style="gap: var(--space-3)">
<button
class="swatch-btn"
data-accent-val="indigo"
data-accent-val="teal"
aria-pressed="true"
style="background: #5b54e6"
title="Indigo"
style="background: #0e7490"
title="Teal"
></button>
<button
class="swatch-btn"
data-accent-val="teal"
data-accent-val="blue"
aria-pressed="false"
style="background: #0f766e"
title="Teal"
style="background: #0f62fe"
title="Blue"
></button>
<button
class="swatch-btn"
data-accent-val="indigo"
aria-pressed="false"
style="background: #5b54e6"
title="Indigo"
></button>
<button
class="swatch-btn"
+23 -12
View File
@@ -79,26 +79,32 @@
}
/*
* Accent — the FREE, swappable layer (doc §3.3). Indigo is the default and is
* Accent — the FREE, swappable layer (doc §3.3). Deep teal is the default and is
* defined on :root / [data-theme='dark'] so `--accent` always resolves even with
* no `[data-accent]` attribute. The alternates below are opt-in; an accent
* switcher arrives with Settings in M5. Brighter values on the dark canvas keep
* accent-on-bg and text-on-accent contrast within AA.
* accent-on-bg and text-on-accent contrast within AA (all values verified AA in
* both themes — see the candidate showcase that picked teal).
*/
:root {
--accent: #5b54e6;
--accent-hover: #4a43d6;
--accent: #0e7490;
--accent-hover: #0c5f77;
--accent-contrast: #ffffff;
}
[data-theme='dark'] {
--accent: #8b85f0;
--accent-hover: #a29bf5;
--accent: #2dd4bf;
--accent-hover: #5eead4;
--accent-contrast: #161616;
}
[data-accent='teal'] {
--accent: #0f766e;
--accent-hover: #0c5f59;
[data-accent='blue'] {
--accent: #0f62fe;
--accent-hover: #0353e9;
--accent-contrast: #ffffff;
}
[data-accent='indigo'] {
--accent: #5b54e6;
--accent-hover: #4a43d6;
--accent-contrast: #ffffff;
}
[data-accent='amber'] {
@@ -111,9 +117,14 @@
--accent-hover: #9f1239;
--accent-contrast: #ffffff;
}
[data-theme='dark'][data-accent='teal'] {
--accent: #2dd4bf;
--accent-hover: #5eead4;
[data-theme='dark'][data-accent='blue'] {
--accent: #78a9ff;
--accent-hover: #a6c8ff;
--accent-contrast: #161616;
}
[data-theme='dark'][data-accent='indigo'] {
--accent: #8b85f0;
--accent-hover: #a29bf5;
--accent-contrast: #161616;
}
[data-theme='dark'][data-accent='amber'] {