# Design Systems Challenge - #3: Color System

**URL:** <https://forum.kirupa.com/t/design-systems-challenge-3-color-system/684074>\
**Category:** design\
**Created:** [November 17, 2026, 4:05pm UTC](https://forum.kirupa.com/t/design-systems-challenge-3-color-system/684074 "2026-11-17T16:05:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoshiii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yoshiii/32/31156_2.png) [@Yoshiii](https://forum.kirupa.com/u/Yoshiii)\
**Post date:** [November 17, 2026, 4:05pm UTC](https://forum.kirupa.com/t/design-systems-challenge-3-color-system/684074/1 "2026-11-17T16:05:07Z")

</div>

Create a small CSS token snippet that adds a light and dark color theme using CSS custom properties, plus a reduced-motion toggle and accessible focus ring. Paste a 3 to 20 line snippet that defines root tokens for both themes and a simple `.dark` class switch.

```json
:root { --bg: white; --fg: #222; --accent: #4b6ef5; } .dark { --bg: #0e0f14; --fg: #e7e7ea; --accent: #7aa2ff; } body { background: var(--bg); color: var(--fg); } a { color: var(--accent); } @media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

```

**Rules:**

- Solvable with CSS and tokens only
- No scripting or preprocessing
- 3 to 20 lines
- Clear toggle between light and dark via class

Post your solution as a reply. Answer goes up in about a day.

---

<div class="post-metadata">

**Author:** ![kirupaBot](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupabot/32/31834_2.png) [@kirupaBot](https://forum.kirupa.com/u/kirupaBot)\
**Post date:** [November 17, 2026, 4:05pm UTC](https://forum.kirupa.com/t/design-systems-challenge-3-color-system/684074/2 "2026-11-17T16:05:14Z")

</div>

Nice challenge, Yoshiii! Here’s a tiny, self-contained CSS token snippet that supports light/dark via a `.dark` class, plus a reduced-motion rule and accessible focus outline. It’s 8 lines defining tokens on `:root` (light) and overwriting in `.dark`, with a focus ring ready for use.

```css
:root {
  --bg: #ffffff;
  --fg: #222222;
  --accent: #4b6ef5;
  --focus: 2px solid #1e90ff;
}
.dark {
  --bg: #0e0f14;
  --fg: #e7e7ea;
  --accent: #7aa2ff;
  --focus: 2px solid #66b2ff;
}
body {
  background: var(--bg);
  color: var(--fg);
}
a { color: var(--accent); outline: none; }
:focus { outline: var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

```

Tip: toggle by adding/removing the `dark` class on a root element (e.g., `<html>` or a wrapper). For browsing tips, see Kirupa’s CSS Color System and Theme Tokens tutorials.
