Color

Live in Codebase

Color is a fundamental part of any design system, shaping the visual identity, usability, and accessibility of a product. A well-defined color system ensures consistency, strengthens branding, and enhances user interactions across different screens and devices.

AA

WCAG 2.1 accessibility compliant

Color

Color is a fundamental part of any design system, shaping the visual identity, usability, and accessibility of a product. A well-defined color system ensures consistency, strengthens branding, and enhances user interactions across different screens and devices.

Color

Live in Codebase

Color is a fundamental part of any design system, shaping the visual identity, usability, and accessibility of a product. A well-defined color system ensures consistency, strengthens branding, and enhances user interactions across different screens and devices.

AA

WCAG 2.1 accessibility compliant

Neutral

Copied

950

#0F0F0F

Copied

900

#1C1C1C

Copied

800

#363636

Copied

700

#525252

Copied

600

#6B6B6B

Copied

500

#878787

Copied

400

#A1A1A1

Copied

300

#BDBDBD

Copied

200

#D6D6D6

Copied

100

#F2F2F2

Copied

50

#FFFFFF

Neutral

Copied

950

#0F0F0F

Copied

900

#1C1C1C

Copied

800

#363636

Copied

700

#525252

Copied

600

#6B6B6B

Copied

500

#878787

Copied

400

#A1A1A1

Copied

300

#BDBDBD

Copied

200

#D6D6D6

Copied

100

#F2F2F2

Copied

50

#FFFFFF

Neutral

Copied

950

#0F0F0F

Copied

900

#1C1C1C

Copied

800

#363636

Copied

700

#525252

Copied

600

#6B6B6B

Copied

500

#878787

Copied

400

#A1A1A1

Copied

300

#BDBDBD

Copied

200

#D6D6D6

Copied

100

#F2F2F2

Copied

50

#FFFFFF

Secondary

Copied

950

#201650

Copied

900

#332689

Copied

800

#3B25AE

Copied

700

#492AD8

Copied

600

#5536F5

Copied

500

#5B4CFF

Copied

400

#7675FF

Copied

300

#9CA4FF

Copied

200

#C2C9FF

Copied

100

#DDE1FF

Copied

50

#ECEFFF

Secondary

Copied

950

#201650

Copied

900

#332689

Copied

800

#3B25AE

Copied

700

#492AD8

Copied

600

#5536F5

Copied

500

#5B4CFF

Copied

400

#7675FF

Copied

300

#9CA4FF

Copied

200

#C2C9FF

Copied

100

#DDE1FF

Copied

50

#ECEFFF

Secondary

Copied

950

#201650

Copied

900

#332689

Copied

800

#3B25AE

Copied

700

#492AD8

Copied

600

#5536F5

Copied

500

#5B4CFF

Copied

400

#7675FF

Copied

300

#9CA4FF

Copied

200

#C2C9FF

Copied

100

#DDE1FF

Copied

50

#ECEFFF

Information

Copied

950

#142D57

Copied

900

#19488F

Copied

800

#1753B6

Copied

700

#1467E1

Copied

600

#1B7EF5

Copied

500

#2E9BFF

Copied

400

#59BCFF

Copied

300

#8ED5FF

Copied

200

#BCE5FF

Copied

100

#D9EFFF

Copied

50

#EEF8FF

Information

Copied

950

#142D57

Copied

900

#19488F

Copied

800

#1753B6

Copied

700

#1467E1

Copied

600

#1B7EF5

Copied

500

#2E9BFF

Copied

400

#59BCFF

Copied

300

#8ED5FF

Copied

200

#BCE5FF

Copied

100

#D9EFFF

Copied

50

#EEF8FF

Information

Copied

950

#142D57

Copied

900

#19488F

Copied

800

#1753B6

Copied

700

#1467E1

Copied

600

#1B7EF5

Copied

500

#2E9BFF

Copied

400

#59BCFF

Copied

300

#8ED5FF

Copied

200

#BCE5FF

Copied

100

#D9EFFF

Copied

50

#EEF8FF

Success

Copied

950

#05291C

Copied

900

#0B4932

Copied

800

#0C593A

Copied

700

#0C7047

Copied

600

#108B57

Copied

500

#1CAB6B

Copied

400

#40C786

Copied

300

#77DEA9

Copied

200

#ADEDC9

Copied

100

#D4F7E1

Copied

50

#EDFCF3

Success

Copied

950

#05291C

Copied

900

#0B4932

Copied

800

#0C593A

Copied

700

#0C7047

Copied

600

#108B57

Copied

500

#1CAB6B

Copied

400

#40C786

Copied

300

#77DEA9

Copied

200

#ADEDC9

Copied

100

#D4F7E1

Copied

50

#EDFCF3

Success

Copied

950

#05291C

Copied

900

#0B4932

Copied

800

#0C593A

Copied

700

#0C7047

Copied

600

#108B57

Copied

500

#1CAB6B

Copied

400

#40C786

Copied

300

#77DEA9

Copied

200

#ADEDC9

Copied

100

#D4F7E1

Copied

50

#EDFCF3

Warning

Copied

950

#421506

Copied

900

#732D14

Copied

800

#8C3614

Copied

700

#AC4511

Copied

600

#CF6410

Copied

500

#EA8716

Copied

400

#F1A92E

Copied

300

#F4C055

Copied

200

#F9E0A4

Copied

100

#FBECCA

Copied

50

#FEF8EC

Warning

Copied

950

#421506

Copied

900

#732D14

Copied

800

#8C3614

Copied

700

#AC4511

Copied

600

#CF6410

Copied

500

#EA8716

Copied

400

#F1A92E

Copied

300

#F4C055

Copied

200

#F9E0A4

Copied

100

#FBECCA

Copied

50

#FEF8EC

Warning

Copied

950

#421506

Copied

900

#732D14

Copied

800

#8C3614

Copied

700

#AC4511

Copied

600

#CF6410

Copied

500

#EA8716

Copied

400

#F1A92E

Copied

300

#F4C055

Copied

200

#F9E0A4

Copied

100

#FBECCA

Copied

50

#FEF8EC

Error

Copied

950

#420D0D

Copied

900

#7A2222

Copied

800

#922222

Copied

700

#B12424

Copied

600

#D23030

Copied

500

#E64D4D

Copied

400

#F17878

Copied

300

#F7A6A6

Copied

200

#FBCDCD

Copied

100

#FCE4E4

Copied

50

#FDF3F3

Error

Copied

950

#420D0D

Copied

900

#7A2222

Copied

800

#922222

Copied

700

#B12424

Copied

600

#D23030

Copied

500

#E64D4D

Copied

400

#F17878

Copied

300

#F7A6A6

Copied

200

#FBCDCD

Copied

100

#FCE4E4

Copied

50

#FDF3F3

Error

Copied

950

#420D0D

Copied

900

#7A2222

Copied

800

#922222

Copied

700

#B12424

Copied

600

#D23030

Copied

500

#E64D4D

Copied

400

#F17878

Copied

300

#F7A6A6

Copied

200

#FBCDCD

Copied

100

#FCE4E4

Copied

50

#FDF3F3

Color Roles & Application

Colour is more than aesthetics, it communicates meaning, establishes hierarchy, and supports readability. But relying on colour alone can create accessibility barriers, especially for users with colour blindness or low vision. This design system uses a three-tier color token architecture for consistent theming across light and dark modes.

Token Hierarchy

Token


Reference Tokens

--ref Base color values in HSL format

System Tokens

--sys Semantic purpose-driven tokens

Component Tokens

Applied directly to UI components

Reference Tokens

Neutral Colors

The foundation of your design system's color palette. These achromatic tokens provide the structural colors for backgrounds, text, and borders. The 11-step scale ensures consistent visual hierarchy and sufficient contrast ratios across light and dark themes. Use neutral tokens for content-focused interfaces where color should support, not distract from, the user experience.

/* Neutral Color Tokens */
:root {
  --ref-neutral-50: 0 0% 100%;         /* Pure white */
  --ref-neutral-100: 0 0% 94.9%;       /* Very light gray */
  --ref-neutral-200: 0 0% 83.92%;      /* Light gray */
  --ref-neutral-300: 0 0% 74.12%;      /* Medium light gray */
  --ref-neutral-400: 0 0% 63.14%;      /* Medium gray */
  --ref-neutral-500: 0 0% 52.94%;      /* Base gray */
  --ref-neutral-600: 0 0% 41.96%;      /* Medium dark gray */
  --ref-neutral-700: 0 0% 32.16%;      /* Dark gray */
  --ref-neutral-800: 0 0% 21.18%;      /* Very dark gray */
  --ref-neutral-900: 0 0% 10.98%;      /* Almost black */
  --ref-neutral-950: 0 0% 5.88%;       /* Near black */
}

Secondary (Brand)

Your primary brand identity expressed through color. This purple-to-blue gradient palette defines your product's visual personality and should be used for primary actions, highlights, and brand moments. The secondary color system creates emotional connection and brand recognition while maintaining accessibility standards across all interface states.

A color palette categorization with three labeled sections: ‘Primary,’ ‘Secondary,’ and ‘Feedback.
/* Light Mode Secondary Tokens */
:root {
  /* Secondary Surface Tokens */
  --sys-surface-secondary-1: var(--ref-secondary-50);       /* Very light purple */
  --sys-surface-secondary-2: var(--ref-secondary-100);      /* Brand badge backgrounds */
  --sys-surface-secondary-3: var(--ref-secondary-300);      /* Medium secondary surfaces */
  --sys-surface-secondary-4: var(--ref-secondary-500);      /* Primary buttons, switches */
  --sys-surface-secondary-5: var(--ref-secondary-700);      /* Button hover states */
  --sys-surface-secondary-pressed: var(--ref-secondary-100); /* Focus/active states */
  
  /* Secondary Text Tokens */
  --sys-text-secondary: var(--ref-secondary-700);           /* Secondary text */
  --sys-text-primary: var(--ref-secondary-500);             /* 2Primary accent text */
  
  /* Secondary Border Tokens */
  --sys-border-6: var(--ref-secondary-500);                 /* Focus borders */
}

/* Dark Mode Secondary Tokens */
.dark:root {
  /* Secondary Surface Tokens */
  --sys-surface-secondary-1: var(--ref-secondary-50);       /* Very light purple */
  --sys-surface-secondary-2: var(--ref-secondary-100);      /* Brand badge backgrounds */
  --sys-surface-secondary-3: var(--ref-secondary-300);      /* Medium secondary surfaces */
  --sys-surface-secondary-4: var(--ref-secondary-500);      /* Primary buttons, switches */
  --sys-surface-secondary-5: var(--ref-secondary-700);      /* Button hover states */
  --sys-surface-secondary-pressed: var(--ref-secondary-950); /* Focus/active states (DARK) */
  
  /* Secondary Text Tokens */
  --sys-text-secondary: var(--ref-secondary-400);           /* Secondary text (DARK) */
  --sys-text-primary: var(--ref-secondary-500);             /* Primary accent text */
  
  /* Secondary Border Tokens */
  --sys-border-6: var(--ref-secondary-300);                 /* Focus borders (DARK) */
  
  /* Secondary Focus Token */
  --sys-focus: var(--ref-secondary-600);                    /* Focus states */

Semantic Color Palettes

Communicative colors that convey meaning and context to users. These carefully calibrated palettes ensure your interface speaks a consistent visual language across information states, user feedback, and system messaging. Each semantic color family is optimized for both accessibility compliance and psychological impact.

Information

Communicates helpful information, guidance, and neutral system messages. Use for tips, documentation links, informational alerts, and educational content.

A color palette categorization with three labeled sections: ‘Primary,’ ‘Secondary,’ and ‘Feedback.
/* Information Colors (Blue) */
:root {
  --ref-information-50: 204.71 100% 96.67%;
  --ref-information-100: 205.26 100% 92.55%;
  --ref-information-200: 203.28 100% 86.86%;
  --ref-information-300: 202.3 100% 77.84%;
  --ref-information-400: 204.22 100% 67.45%;
  --ref-information-500: 208.71 100% 59.02%;
  --ref-information-600: 212.75 91.6% 53.33%;
  --ref-information-700: 215.71 83.67% 48.04%;
  --ref-information-800: 217.36 77.56% 40.2%;
  --ref-information-900: 216.1 70.24% 32.94%;
  --ref-information-950: 217.61 62.62% 20.98%;
}

Success

Celebrates positive outcomes and completed actions. Reserve for successful form submissions, completed processes, positive confirmations, and achievement indicators.

A color palette categorization with three labeled sections: ‘Primary,’ ‘Secondary,’ and ‘Feedback.
/* Success Colors (Green) */
:root {
  --ref-success-50: 144 71.43% 95.88%;
  --ref-success-100: 142.29 68.63% 90%;
  --ref-success-200: 146.25 64% 80.39%;
  --ref-success-300: 149.13 60.95% 66.86%;
  --ref-success-400: 151.11 54.66% 51.57%;
  --ref-success-500: 153.15 71.86% 39.02%;
  --ref-success-600: 154.63 79.35% 30.39%;
  --ref-success-700: 155.4 80.65% 24.31%;
  --ref-success-800: 155.84 76.24% 19.8%;
  --ref-success-900: 157.74 73.81% 16.47%;
  --ref-success-950: 158.33 78.26% 9.02%;
}

Warning

Signals caution and important notices that require user attention. Apply to non-critical alerts, missing information, and situations that need user awareness before proceeding.

/* Warning Colors (Orange) */
:root {
  --ref-warning-50: 40 90% 96.08%;
  --ref-warning-100: 41.63 85.96% 88.82%;
  --ref-warning-200: 42.35 87.63% 80.98%;
  --ref-warning-300: 40.38 87.85% 64.51%;
  --ref-warning-400: 37.85 87.44% 56.27%;
  --ref-warning-500: 31.98 83.46% 50.2%;
  --ref-warning-600: 26.39 85.65% 43.73%;
  --ref-warning-700: 20.13 82.01% 37.06%;
  --ref-warning-800: 17 75% 31.37%;
  --ref-warning-900: 15.79 70.37% 26.47%;
  --ref-warning-950: 15 83.33% 14.12%;
}

Error

Indicates problems, failures, and critical issues requiring immediate user action. Use for form validation errors, system failures, destructive action confirmations, and blocking issues.

:root {
  --ref-error-50: 0 71.43% 97.25%;
  --ref-error-100: 0 80% 94.12%;
  --ref-error-200: 0 85.19% 89.41%;
  --ref-error-300: 0 83.51% 80.98%;
  --ref-error-400: 0 81.21% 70.78%;
  --ref-error-500: 0 75.37% 60.2%;
  --ref-error-600: 0 64.29% 50.59%;
  --ref-error-700: 0 66.2% 41.76%;
  --ref-error-800: 0 62.22% 35.29%;
  --ref-error-900: 0 56.41% 30.59%;
  --ref-error-950: 0 67.09% 15.49%;
}

Functional Tokens

Semantic colors for user feedback and system states. These tokens communicate specific meanings through color while maintaining accessibility and consistency across different interface contexts and themes.

/* Light Mode Functional Tokens */
:root {
  --sys-fn-generic: var(--ref-neutral-50);           /* Generic/neutral backgrounds */
  --sys-fn-success: var(--ref-success-200);          /* Success backgrounds */
  --sys-fn-success-text: var(--ref-success-900);     /* Success text */
  --sys-fn-error: var(--ref-error-200);              /* Error backgrounds */
  --sys-fn-error-text: var(--ref-error-800);         /* Error text */
  --sys-fn-warning: var(--ref-warning-200);          /* Warning backgrounds */
  --sys-fn-warning-text: var(--ref-warning-800);     /* Warning text */
  --sys-fn-information: var(--ref-information-200);  /* Info backgrounds */
  --sys-fn-information-text: var(--ref-information-800); /* Info text */
}

/* Dark Mode Functional Tokens */
.dark:root {
  --sys-fn-generic: var(--ref-neutral-950);          /* Generic/neutral backgrounds */
  --sys-fn-success: var(--ref-success-950);          /* Success backgrounds */
  --sys-fn-success-text: var(--ref-success-400);     /* Success text */
  --sys-fn-error: var(--ref-error-950);              /* Error backgrounds */
  --sys-fn-error-text: var(--ref-error-400);         /* Error text */
  --sys-fn-warning: var(--ref-warning-950);          /* Warning backgrounds */
  --sys-fn-warning-text: var(--ref-warning-300);     /* Warning text */
  --sys-fn-information: var(--ref-information-950);  /* Info backgrounds */
  --sys-fn-information-text: var(--ref-information-400); /* Info text */
}

System Tokens

Surface

The spatial foundation of your interface. Surface tokens define the background colors and container styles that create depth, hierarchy, and visual organization in your layouts. These tokens automatically adapt between light and dark themes while maintaining consistent relationships and contrast ratios. Use surface tokens to establish clear information architecture and guide user focus through layered content.

/* Light Mode Surface Tokens */
:root {
  --sys-surface-neutral-0: var(--ref-neutral-50);     /* Primary background, hover states, dialogs */
  --sys-surface-neutral-1: var(--ref-neutral-100);    /* Available for elevated surfaces */
  --sys-surface-neutral-2: var(--ref-neutral-200);    /* UI element backgrounds (drag handles, buttons) */
  --sys-surface-neutral-3: var(--ref-neutral-800);    /* Available for dark surface elements */
  --sys-surface-neutral-4: var(--ref-neutral-900);    /* Available for darker surface elements */
  --sys-surface-neutral-5: var(--ref-neutral-950);    /* Tooltip backgrounds */
  --sys-surface-disabled: var(--ref-neutral-200);     /* Available for disabled states */
  --sys-surface-scrim: var(--ref-neutral-100) / 50%;  /* Overlay scrim */
  --sys-surface-card: var(--ref-neutral-50);          /* Card component backgrounds */
  --sys-surface-black: var(--ref-neutral-950);        /* Button destructive variant */
  --sys-surface-white: var(--ref-neutral-50);         /* Available for pure white */
  --sys-surface-secondary-1: var(--ref-secondary-50); /* Available for light secondary */
  --sys-surface-secondary-2: var(--ref-secondary-100);/* Brand badge backgrounds */
  --sys-surface-secondary-3: var(--ref-secondary-300);/* Available for medium secondary */
  --sys-surface-secondary-4: var(--ref-secondary-500);/* Primary buttons, switch active, progress bars */
  --sys-surface-secondary-5: var(--ref-secondary-700);/* Button hover states */
  --sys-surface-secondary-pressed: var(--ref-secondary-100); /* Focus/active states (inputs, checkboxes, toggles) */
}

/* Dark Mode Surface Tokens */
.dark:root {
  --sys-surface-neutral-0: var(--ref-neutral-950);    /* Primary background, hover states, dialogs */
  --sys-surface-neutral-1: var(--ref-neutral-900);    /* Available for elevated surfaces */
  --sys-surface-neutral-2: var(--ref-neutral-800);    /* UI element backgrounds (drag handles, buttons) */
  --sys-surface-neutral-3: var(--ref-neutral-200);    /* Available for light surface elements */
  --sys-surface-neutral-4: var(--ref-neutral-100);    /* Available for lighter surface elements */
  --sys-surface-neutral-5: var(--ref-neutral-50);     /* Tooltip backgrounds */
  --sys-surface-disabled: var(--ref-neutral-950);     /* Available for disabled states */
  --sys-surface-scrim: var(--ref-neutral-100) / 50%;  /* Overlay scrim */
  --sys-surface-card: var(--ref-neutral-900);         /* Card component backgrounds */
  --sys-surface-black: var(--ref-neutral-950);        /* Button destructive variant */
  --sys-surface-white: var(--ref-neutral-50);         /* Available for pure white */
  --sys-surface-secondary-1: var(--ref-secondary-50); /* Available for light secondary */
  --sys-surface-secondary-2: var(--ref-secondary-100);/* Brand badge backgrounds */
  --sys-surface-secondary-3: var(--ref-secondary-300);/* Available for medium secondary */
  --sys-surface-secondary-4: var(--ref-secondary-500);/* Primary buttons, switch active, progress bars */
  --sys-surface-secondary-5: var(--ref-secondary-700);/* Button hover states */
  --sys-surface-secondary-pressed: var(--ref-secondary-950); /* Focus/active states (inputs, checkboxes, toggles) */
}

Text Tokens

Typography colors engineered for maximum readability and accessibility. These tokens ensure all text meets WCAG contrast requirements while maintaining visual hierarchy and semantic meaning. Text tokens automatically adjust between light and dark themes to provide optimal legibility across all interface contexts, from primary content to subtle annotations.

/* Light Mode Text Tokens */
:root {
  --sys-text-body: var(--ref-neutral-950);        /* Primary text */
  --sys-text-body-inverse: var(--ref-neutral-50); /* Inverse text */
  --sys-text-secondary: var(--ref-secondary-700); /* Secondary text */
  --sys-text-primary: var(--ref-secondary-500);   /* Primary accent text */
  --sys-text-white: var(--ref-neutral-50);        /* Pure white text */
  --sys-text-black: var(--ref-neutral-950);       /* Pure black text */
  --sys-text-neutral-1: var(--ref-neutral-50);    /* Light neutral text */
  --sys-text-neutral-2: var(--ref-neutral-300);   /* Medium light neutral text */
  --sys-text-neutral-3: var(--ref-neutral-600);   /* Muted text */
  --sys-text-neutral-4: var(--ref-neutral-900);   /* Dark neutral text */
  --sys-text-disabled: var(--ref-neutral-600);    /* Disabled text */
}

/* Dark Mode Text Tokens */
.dark:root {
  --sys-text-body: var(--ref-neutral-50);         /* Primary text */
  --sys-text-body-inverse: var(--ref-neutral-950);/* Inverse text */
  --sys-text-secondary: var(--ref-secondary-400); /* Secondary text */
  --sys-text-primary: var(--ref-secondary-500);   /* Primary accent text */
  --sys-text-white: var(--ref-neutral-50);        /* Pure white text */
  --sys-text-black: var(--ref-neutral-950);       /* Pure black text */
  --sys-text-neutral-1: var(--ref-neutral-900);   /* Light neutral text */
  --sys-text-neutral-2: var(--ref-neutral-600);   /* Medium light neutral text */
  --sys-text-neutral-3: var(--ref-neutral-300);   /* Muted text */
  --sys-text-neutral-4: var(--ref-neutral-50);    /* Dark neutral text */
  --sys-text-disabled: var(--ref-neutral-600);    /* Disabled text */
}

Border Tokens

Structural elements that define component boundaries and interactive states. These tokens provide consistent visual separation while adapting to light and dark themes for optimal contrast and accessibility.

/* Light Mode Border Tokens */
:root {
  --sys-border-1: var(--ref-neutral-900);         /* Strongest borders */
  --sys-border-2: var(--ref-neutral-800);         /* Strong borders */
  --sys-border-3: var(--ref-neutral-600);         /* Medium borders */
  --sys-border-4: var(--ref-neutral-300);         /* Input borders */
  --sys-border-5: var(--ref-neutral-200);         /* Card borders */
  --sys-border-6: var(--ref-secondary-500);       /* Focus borders */
  --sys-border-information: var(--ref-information-400); /* Info state borders */
  --sys-border-success: var(--ref-success-400);   /* Success state borders */
  --sys-border-warning: var(--ref-warning-400);   /* Warning state borders */
  --sys-border-error: var(--ref-error-400);       /* Error state borders */
}

/* Dark Mode Border Tokens */
.dark:root {
  --sys-border-1: var(--ref-neutral-200);         /* Strongest borders */
  --sys-border-2: var(--ref-neutral-300);         /* Strong borders */
  --sys-border-3: var(--ref-neutral-600);         /* Medium borders */
  --sys-border-4: var(--ref-neutral-800);         /* Input borders */
  --sys-border-5: var(--ref-neutral-800);         /* Card borders */
  --sys-border-6: var(--ref-secondary-300);       /* Focus borders */
  --sys-border-information: var(--ref-information-800); /* Info state borders */
  --sys-border-success: var(--ref-success-800);   /* Success state borders */
  --sys-border-warning: var(--ref-warning-800);   /* Warning state borders */
  --sys-border-error: var(--ref-error-800);       /* Error state borders */
}

WCAG 2.1 Level AA Requirements

Criteria

Definition

Normal text

4.5:1 contrast ratio minimum

Large text

3:1 contrast ratio minimum

UI components

3:1 contrast ratio for interactive elements

Contrast Ratios

The design system ensures WCAG AA compliance through

High Contrast Combinations

--sys-text-body on --sys-surface-neutral-0 21:1 ratio

--sys-text-secondary on --sys-surface-neutral-0 8:1 ratio

--sys-fn-error-text on --sys-fn-error 4.8:1 ratio

Focus Indicators

--sys-focus (`--ref-secondary-600`) Provides 3:1+ contrast on all surfaces

Choosing the Right Token

1. Always use system tokens --sys in components

2. Never reference reference tokens --ref directly in components

3. Use semantic tokens for state-specific styling

4. Test contrast in both light and dark modes

Component Implementation

/* ✅ Correct - Using system tokens */
.button {
  background-color: hsl(var(--sys-surface-secondary-4));
  color: hsl(var(--sys-text-body));
  border: 1px solid hsl(var(--sys-border-6));
}

/* ❌ Incorrect - Using reference tokens directly */
.button {
  background-color: hsl(var(--ref-secondary-500));
  color: hsl(var(--ref-neutral-950));
}

Dark Mode Switching

The system automatically switches token mappings based on the .dark class

<!-- Light mode -->
<html>
  <body class="bg-sys-surface-neutral-0 text-sys-text-body">
    <!-- Content uses light theme tokens -->
  </body>
</html>

<!-- Dark mode -->
<html class="dark">
  <body class="bg-sys-surface-neutral-0 text-sys-text-body">
    <!-- Same classes, different token values -->
  </body>
</html>

Continue reading

Get in touch

Got a project in mind? Let’s chat. I’m always keen to hear about new ideas, collaborations, or challenges you’re looking to solve. Drop me a message and we can explore how to bring your vision to life together.

Get in touch

Got a project in mind? Let’s chat. I’m always keen to hear about new ideas, collaborations, or challenges you’re looking to solve. Drop me a message and we can explore how to bring your vision to life together.

Get in touch

Got a project in mind? Let’s chat. I’m always keen to hear about new ideas, collaborations, or challenges you’re looking to solve. Drop me a message and we can explore how to bring your vision to life together.

Create a free website with Framer, the website builder loved by startups, designers and agencies.