A status panel defines foreground and background tokens, reads them into the component, and adds an accent color with readable contrast.

Program

Color decisions are easier to maintain when reusable tokens hold foreground, background, and accent values. Each token still needs enough contrast in the final UI.

color_contrast_tokens.html
<style>
.contrast { --fg: #0f172a; --bg: #f8fafc; }
.contrast { color: var(--fg); background: var(--bg); }
.contrast { border: 3px solid #0f766e; padding: 18px; }
.contrast strong { color: #0f766e; }
</style>

<section class="contrast">
  <strong>System ready</strong>
  <span>Contrast target met</span>
</section>
contrast Contrast is the visible difference between foreground and background colors.
color token A color token is a named reusable color value.