Skip to content

Colors

Cocoar's color system is built on two layers: primitives (the raw palette) and semantic tokens (purpose-driven aliases). Semantic tokens adapt to light and dark mode automatically — always use them in your components instead of referencing primitives directly.

Color Primitives

Six scales, ten shades each. These are the building blocks that semantic tokens reference under the hood.

GrayNeutral UI
50
100
200
300
400
500
600
700
800
900
SlateBrand
50
100
200
300
400
500
600
700
800
900
AccentThemeable
50
100
200
300
400
500
600
700
800
900
GreenSuccess
50
100
200
300
400
500
600
700
800
900
RedError
50
100
200
300
400
500
600
700
800
900
AmberWarning
50
100
200
300
400
500
600
700
800
900

When to use primitives

Almost never. Use semantic tokens in component code. Primitives are useful only when defining new semantic tokens or building one-off illustrations.

Semantic Colors

Semantic tokens give colors meaning — background, text, border, or status — so your UI stays consistent and adapts to theme changes without touching component code.

Backgrounds

Neutral Primary--coar-background-neutral-primary
Neutral Secondary--coar-background-neutral-secondary
Neutral Tertiary--coar-background-neutral-tertiary
Accent Primary--coar-background-accent-primary
Accent Secondary--coar-background-accent-secondary
Accent Tertiary--coar-background-accent-tertiary
Accent Hover--coar-background-accent-hover
Brand Primary--coar-background-brand-primary
Brand Secondary--coar-background-brand-secondary
Brand Tertiary--coar-background-brand-tertiary
A

Text

Ag
Neutral Primary--coar-text-neutral-primary
Ag
Neutral Secondary--coar-text-neutral-secondary
Ag
Neutral Tertiary--coar-text-neutral-tertiary
Ag
Neutral Disabled--coar-text-neutral-disabled
Ag
Accent Primary--coar-text-accent-primary
Ag
Accent Secondary--coar-text-accent-secondary
Ag
Brand Primary--coar-text-brand-primary

Borders

Neutral Primary--coar-border-neutral-primary
Neutral Secondary--coar-border-neutral-secondary
Neutral Tertiary--coar-border-neutral-tertiary
Accent Primary--coar-border-accent-primary
Accent Secondary--coar-border-accent-secondary
Input--coar-border-input
Input Hover--coar-border-input-hover

Status

Success Bold--coar-background-semantic-success-bold
Success Subtle--coar-background-semantic-success-subtle
Error Bold--coar-background-semantic-error-bold
Error Subtle--coar-background-semantic-error-subtle
Warning Bold--coar-background-semantic-warning-bold
Warning Subtle--coar-background-semantic-warning-subtle
Info Bold--coar-background-semantic-info-bold
Info Subtle--coar-background-semantic-info-subtle

Usage Example

A realistic card built entirely with semantic tokens. Toggle light/dark mode to see every color adapt.

JD
John DoeSenior Designer

This card is built entirely with semantic color tokens. Toggle between light and dark mode to see how every color adapts automatically.

DesignActiveReview
--coar-background-neutral-primaryCard surface
--coar-text-neutral-primaryTitle text
--coar-text-neutral-secondaryBody text
--coar-background-accent-primaryPrimary button
--coar-border-neutral-tertiaryCard border

Token Naming Convention

All tokens follow a predictable pattern:

--coar-{usage}-{category}-{variant}
SegmentValuesExamples
Usagebackground, text, border, iconWhat the color is applied to
Categoryneutral, brand, accent, semantic-{status}The color family
Variantprimary, secondary, tertiary, bold, subtle, hover, active, disabledEmphasis level or state

Token Reference

Background

TokenUsage
--coar-background-neutral-primaryDefault page / card surface
--coar-background-neutral-secondarySlightly raised surface
--coar-background-neutral-tertiarySubtle fill for inputs, hover states
--coar-background-accent-primaryPrimary accent (buttons, active states)
--coar-background-accent-secondaryLighter accent fill
--coar-background-accent-tertiarySubtlest accent fill
--coar-background-accent-hoverAccent hover state
--coar-background-accent-activeAccent pressed state
--coar-background-brand-primaryBrand-colored surface
--coar-background-brand-secondaryLighter brand surface
--coar-background-brand-tertiarySubtlest brand surface

Text

TokenUsage
--coar-text-neutral-primaryPrimary body text
--coar-text-neutral-secondarySupporting / secondary text
--coar-text-neutral-tertiaryPlaceholder, hint text
--coar-text-neutral-disabledDisabled text
--coar-text-accent-primaryAccent-colored text (links, highlights)
--coar-text-accent-secondaryLighter accent text
--coar-text-brand-primaryBrand-colored text
--coar-text-on-boldWhite text on bold / colored surfaces

Border

TokenUsage
--coar-border-neutral-primaryStrong border (emphasis)
--coar-border-neutral-secondaryDefault visible border
--coar-border-neutral-tertiarySubtle divider
--coar-border-accent-primaryAccent border (focus rings)
--coar-border-accent-secondaryLighter accent border
--coar-border-inputInput field border
--coar-border-input-hoverInput border on hover

Status

TokenUsage
--coar-background-semantic-success-boldSuccess background (solid)
--coar-background-semantic-success-subtleSuccess background (light)
--coar-background-semantic-error-boldError background (solid)
--coar-background-semantic-error-subtleError background (light)
--coar-background-semantic-warning-boldWarning background (solid)
--coar-background-semantic-warning-subtleWarning background (light)
--coar-background-semantic-info-boldInfo background (solid)
--coar-background-semantic-info-subtleInfo background (light)
--coar-text-semantic-success-boldSuccess text (strong)
--coar-text-semantic-error-boldError text (strong)
--coar-text-semantic-warning-boldWarning text (strong)
--coar-text-semantic-info-boldInfo text (strong)

Released under the Apache-2.0 License.