Colors

The Skeleton color system.

Skeleton provides guardrails and utilities to create a powerful color system. This includes a number of colors, shades, and contrast values that work together seamlessly. Including a visually appealing and accessible color palette for each theme.

Color Palette

Primary
50
100
200
300
400
500
600
700
800
900
950
Secondary
50
100
200
300
400
500
600
700
800
900
950
Tertiary
50
100
200
300
400
500
600
700
800
900
950
Success
50
100
200
300
400
500
600
700
800
900
950
Warning
50
100
200
300
400
500
600
700
800
900
950
Error
50
100
200
300
400
500
600
700
800
900
950
Surface
50
100
200
300
400
500
600
700
800
900
950

Supports all Tailwind color utility classes using the following pattern.

txt
{property}-{color}-{shade}
KeyAccepted Values
Propertyaccent, bg, border, caret, decoration, divide, fill, outline, ring, shadow, stroke, text
Colorprimary, secondary, tertiary, success, warning, error, surface
Shade50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950
html
<div class="bg-primary-500">...</div>
<div class="border border-secondary-600">...</div>
<svg class="fill-surface-950">...</svg>

Contrast Colors

Contrast color values are available for every shade. Use these to set accessible text color and icon fill values. See also the Preset system for utility classes that automatically mix each color and contrast tone.

txt
{property}-{color}-contrast-{shade}

View the example below while you test different combinations of themes and dark mode. In all scenarios the contrast tones will maintain an accessible contrast ratio for the icon and text labels.

User Defined

Primary
Secondary
Tertiary

Color Pairings

Primary
Secondary
Tertiary

Presets

Primary
Secondary
Tertiary

Color Pairings

Provides a condensed syntax for dual-tone color values, evenly balanced to swap between light and dark mode. Pairings are supported for all Tailwind utility color classes (bg, border, fill, etc).

txt
{property}-{color}-{lightModeShade}-{darkModeShade}
html
<div class="bg-surface-200-800">...</div>
<div class="border border-secondary-400-600">...</div>
<svg class="fill-secondary-50-950">...</svg>

How Pairings Work

Color Pairing are enabled through the use of the CSS light-dark function. This means instead of writing the standard light/dark syntax with Tailwind utilities:

html
<div class="text-primary-300 dark:text-primary-700">...</div>

You can instead use a much more condensed syntax:

html
<div class="text-primary-300-700">...</div>

This will then be implemented into your CSS bundle as follows:

css
.text-primary-300-700 {
	color: light-dark(var(--color-primary-300), var(--color-primary-700));
}

Plus, as a benefit to using the CSS light-dark() function, this also enables use of Tailwind’s Color Scheme utilities. Learn more about using Color Scheme .

Pairing Previews

The following is a static representation of each pairing. Only primary is shown, but all Skeleton colors are supported. Note that shade 500 does not have a pairing, and instead represents your key brand shade per each color ramp.

500
Brand
400
300
200
100
50
600
700
800
900
950

To see the Color Pairing in action, toggle this website between light and dark mode and monitor the following. The top number represents the light mode shade, while the bottom the dark mode shade.

50 950
100 900
200 800
300 700
400 600
500
600 400
700 300
800 200
900 100
950 50
Based on mode
Static
Based on mode

When to Use Pairings

Color Parings are useful for generating a hierarchy of visual layers, ranging from foreground to background elements. Each reuse the same color ramp, but invert the order when switching from light to dark mode.

Dark Mode 950 900 800 700 600 500 400 300 200 100 50 Light Mode 50 100 200 300 400 500 600 700 800 900 950
  • We can use shade 950 for light mode and 50 from dark mode to represent our body text color.
  • Then use shade 50 from light mode and 950 from dark mode to represent our app background.
  • Use the static 500 shade for key branding elements, such as buttons or banners.
  • Then reserve multiple layers between for elements such as cards, inputs, and more.

Transparency

All available Skeleton Colors and Color Pairings support Tailwind’s color transparency syntax.

html
<div class="bg-primary-500/25">Primary Color @ 25% transparency</div>
<div class="bg-surface-50-950/60">Surface Pairing 50/950 @ 60% transparency</div>
View page on GitHub