A playground to explore color system in both light and dark themes, using vanilla JavaScript and CSS. No framework except Astro were used.

Edit Color

Color Palette

Background
Surface
Text
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark

Component Examples

Interactive Buttons

These buttons demonstrate the different color variants available in both themes.

Typography on Background

Regular text using the main text color for body content.

Primary colored text for important highlights and links.

Secondary colored text for subtle accents and labels.

Success messages for positive feedback and confirmations.

Error or danger messages for warnings and critical alerts.

Warning messages for cautionary information.

Informational messages for helpful tips and details.

Typography on Surface

Regular text using the main text color for body content.

Primary colored text for important highlights and links.

Secondary colored text for subtle accents and labels.

Success messages for positive feedback and confirmations.

Error or danger messages for warnings and critical alerts.

Warning messages for cautionary information.

Informational messages for helpful tips and details.

Form Elements

Form inputs that adapt to the current theme automatically.

Code Examples

Code blocks and inline code that adapt to the theme colors.

Here's some inline code that adapts to the theme.

// JavaScript example
const themeManager = {
  currentTheme: 'light',

  toggleTheme() {
    this.currentTheme = this.currentTheme === 'light' ? 'dark' : 'light';
  }
};
/* CSS Variables */
:root {
  --primary: #006564;
  --secondary: #FFC0CB;
  --bg: #FAFAFA;
}

Use var(--primary) for theme colors.

How to Use