Agent skill

Better Colors Skill: Palettes, Tokens and Contrast

The better-colors skill makes an AI coding agent build OKLCH ramps, name semantic color tokens, convert formats and measure contrast pairs instead of estimating them.

Install
git clone https://github.com/jakubkrehel/skills.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the better-colors skill?

The better-colors skill is a folder in Jakub Krehel's skills repo for building and auditing color systems. It generates ramps, maps their steps to roles and token names, converts color notation and measures rendered contrast pairs. It will not report a contrast value it did not measure or estimate a color it could compute.

A skill that treats color as a system of ramps, roles and tokens rather than a pile of hex values. It builds the system, audits an existing one and measures contrast on the pairs that actually render.

Its first rule is evidence. A broken role mapping, a failing pair and an out of gamut step are findings. Notation, a tinted neutral and a gradient's interpolation space are project choices and are left alone.

How a color system gets built

  • One neutral ramp, one accent ramp and only the status ramps the product renders. A warning ramp nothing imports is not generated.
  • Every step has a job, such as page background, hover, border, solid fill or body text.
  • Primitives are named by hue, like --blue-600. Semantic tokens are named by role, like --color-text-secondary, and only those are used in components.
  • Ramps hold one hue end to end, built with a color library and never by eye.

Measuring contrast

The skill measures a foreground against the background it really renders on, including alpha and images beneath it. When a pair fails, it reports the pair, the value and the threshold missed, and leaves the colors alone unless you ask.

Who better-colors suits

Best for

  • Starting a palette or token layer for a new project.
  • Cleaning up a codebase with hex, rgb and oklch literals scattered through components.
  • Adding dark mode tokens and checking every pair afterward.

Not for

  • Deciding whether a pair must pass. That requirement belongs to better-accessibility.
  • Shadows, surfaces and icon color, which belong to better-ui.
  • Extracting a design system from existing work. Related: extract-design-system.

Use it with UiChemy

Settle your tokens first, then bring the design into WordPress through UiChemy Figma to WordPress or Composer, and measure contrast again on the converted page. Click Get Started on uichemy.com.