Design · Jun 19, 2026 · 1 min read

A color system that runs on one variable

AAbdullah Sahin
Table of contents

The entire ToolsQube interface hangs off a single CSS variable: the accent color. Change it, and buttons, focus rings, icons and links all update at once.

Protecting contrast automatically#

Using the same bright green directly on a light theme breaks legibility. So the accent color is darkened at runtime relative to the background, the brand color stays recognizable, and contrast never drops below the WCAG AA threshold.

One source, many surfaces#

Different uses, a button background, text color, a shadow glow, are all derived from the same base variable instead of separate hardcoded constants. Adding a new accent color is just typing in one hex code.

SHARE

Related posts

Command Palette

Search for a command to run…