skills/material-design-3-color/SKILL.md
Applies Material Design 3 Expressive dynamic color and theming principles to user interfaces. Use this when working on color palettes, themes, dynamic color systems, accessibility, or when the user asks to apply Material Design 3 color guidelines to a design or application.
npx skillsauth add shelbeely/shelbeely-agent-skills material-design-3-colorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides the application of Material Design 3 (M3) Expressive color and theming principles to create vibrant, accessible, and emotionally engaging user interfaces.
Keywords: Material Design 3, M3, dynamic color, theming, color palette, Material You, accessibility, color tokens, surface colors, accent colors, fixed accent colors, emphasis colors, contrast levels
Material Design 3's color system is built on the concept of dynamic color, allowing interfaces to adapt to user preferences and contexts:
When creating color palettes, follow this structure:
Primary Palette (Main brand color):
Secondary Palette (Complementary accent):
Tertiary Palette (Contrasting accent — now a prominent expressive accent for branding and highlights):
Neutral Palettes (Surfaces and backgrounds):
Error/Warning/Success (Feedback colors):
Contrast Levels (M3 Expressive standardizes three levels):
Contrast Requirements:
Color Independence:
Dynamic Range:
Use CSS custom properties (variables) for all colors. M3 Expressive introduces 26+ color roles:
:root {
/* Primary */
--md-sys-color-primary: #6750A4;
--md-sys-color-on-primary: #FFFFFF;
--md-sys-color-primary-container: #EADDFF;
--md-sys-color-on-primary-container: #21005D;
/* Primary Fixed (consistent across themes) */
--md-sys-color-primary-fixed: #EADDFF;
--md-sys-color-on-primary-fixed: #21005D;
--md-sys-color-primary-fixed-dim: #D0BCFF;
--md-sys-color-on-primary-fixed-variant: #4F378B;
/* Secondary */
--md-sys-color-secondary: #625B71;
--md-sys-color-on-secondary: #FFFFFF;
--md-sys-color-secondary-container: #E8DEF8;
--md-sys-color-on-secondary-container: #1D192B;
/* Secondary Fixed */
--md-sys-color-secondary-fixed: #E8DEF8;
--md-sys-color-on-secondary-fixed: #1D192B;
--md-sys-color-secondary-fixed-dim: #CCC2DC;
--md-sys-color-on-secondary-fixed-variant: #4A4458;
/* Tertiary */
--md-sys-color-tertiary: #7D5260;
--md-sys-color-on-tertiary: #FFFFFF;
--md-sys-color-tertiary-container: #FFD8E4;
--md-sys-color-on-tertiary-container: #31111D;
/* Tertiary Fixed */
--md-sys-color-tertiary-fixed: #FFD8E4;
--md-sys-color-on-tertiary-fixed: #31111D;
--md-sys-color-tertiary-fixed-dim: #EFB8C8;
--md-sys-color-on-tertiary-fixed-variant: #633B48;
/* Surface and Surface Containers */
--md-sys-color-surface: #FEF7FF;
--md-sys-color-on-surface: #1D1B20;
--md-sys-color-surface-variant: #E7E0EC;
--md-sys-color-on-surface-variant: #49454F;
--md-sys-color-surface-dim: #DED8E1;
--md-sys-color-surface-bright: #FEF7FF;
--md-sys-color-surface-container-lowest: #FFFFFF;
--md-sys-color-surface-container-low: #F7F2FA;
--md-sys-color-surface-container: #F3EDF7;
--md-sys-color-surface-container-high: #ECE6F0;
--md-sys-color-surface-container-highest: #E6E0E9;
/* Inverse */
--md-sys-color-inverse-surface: #322F35;
--md-sys-color-inverse-on-surface: #F5EFF7;
--md-sys-color-inverse-primary: #D0BCFF;
/* Outlines */
--md-sys-color-outline: #79747E;
--md-sys-color-outline-variant: #CAC4D0;
/* Error */
--md-sys-color-error: #B3261E;
--md-sys-color-on-error: #FFFFFF;
--md-sys-color-error-container: #F9DEDC;
--md-sys-color-on-error-container: #410E0B;
/* Scrim and Shadow */
--md-sys-color-scrim: #000000;
--md-sys-color-shadow: #000000;
}
[data-theme="dark"] {
/* Primary */
--md-sys-color-primary: #D0BCFF;
--md-sys-color-on-primary: #381E72;
--md-sys-color-primary-container: #4F378B;
--md-sys-color-on-primary-container: #EADDFF;
/* Primary Fixed (same as light — these don't change) */
--md-sys-color-primary-fixed: #EADDFF;
--md-sys-color-on-primary-fixed: #21005D;
--md-sys-color-primary-fixed-dim: #D0BCFF;
--md-sys-color-on-primary-fixed-variant: #4F378B;
/* Secondary */
--md-sys-color-secondary: #CCC2DC;
--md-sys-color-on-secondary: #332D41;
--md-sys-color-secondary-container: #4A4458;
--md-sys-color-on-secondary-container: #E8DEF8;
/* Secondary Fixed (same as light) */
--md-sys-color-secondary-fixed: #E8DEF8;
--md-sys-color-on-secondary-fixed: #1D192B;
--md-sys-color-secondary-fixed-dim: #CCC2DC;
--md-sys-color-on-secondary-fixed-variant: #4A4458;
/* Tertiary */
--md-sys-color-tertiary: #EFB8C8;
--md-sys-color-on-tertiary: #492532;
--md-sys-color-tertiary-container: #633B48;
--md-sys-color-on-tertiary-container: #FFD8E4;
/* Tertiary Fixed (same as light) */
--md-sys-color-tertiary-fixed: #FFD8E4;
--md-sys-color-on-tertiary-fixed: #31111D;
--md-sys-color-tertiary-fixed-dim: #EFB8C8;
--md-sys-color-on-tertiary-fixed-variant: #633B48;
/* Surface and Surface Containers */
--md-sys-color-surface: #141218;
--md-sys-color-on-surface: #E6E0E9;
--md-sys-color-surface-variant: #49454F;
--md-sys-color-on-surface-variant: #CAC4D0;
--md-sys-color-surface-dim: #141218;
--md-sys-color-surface-bright: #3B383E;
--md-sys-color-surface-container-lowest: #0F0D13;
--md-sys-color-surface-container-low: #1D1B20;
--md-sys-color-surface-container: #211F26;
--md-sys-color-surface-container-high: #2B2930;
--md-sys-color-surface-container-highest: #36343B;
/* Inverse */
--md-sys-color-inverse-surface: #E6E0E9;
--md-sys-color-inverse-on-surface: #322F35;
--md-sys-color-inverse-primary: #6750A4;
/* Outlines */
--md-sys-color-outline: #938F99;
--md-sys-color-outline-variant: #49454F;
/* Error */
--md-sys-color-error: #F2B8B5;
--md-sys-color-on-error: #601410;
--md-sys-color-error-container: #8C1D18;
--md-sys-color-on-error-container: #F9DEDC;
/* Scrim and Shadow */
--md-sys-color-scrim: #000000;
--md-sys-color-shadow: #000000;
}
Fixed accent colors are new in M3 Expressive. They maintain the same value across light and dark themes, useful for brand identity elements:
/* Fixed colors remain identical in both themes */
.brand-banner {
background-color: var(--md-sys-color-primary-fixed);
color: var(--md-sys-color-on-primary-fixed);
}
.brand-accent {
background-color: var(--md-sys-color-tertiary-fixed);
color: var(--md-sys-color-on-tertiary-fixed);
}
/* Fixed Dim for secondary emphasis on fixed surfaces */
.brand-banner-secondary {
background-color: var(--md-sys-color-primary-fixed-dim);
color: var(--md-sys-color-on-primary-fixed);
}
M3 Expressive standardizes three contrast levels for accessibility:
/* Standard contrast (default) */
:root {
--md-sys-color-contrast-level: 0;
}
/* Medium contrast */
[data-contrast="medium"] {
--md-sys-color-primary: #5640A0;
--md-sys-color-on-primary: #FFFFFF;
--md-sys-color-primary-container: #7B68BA;
--md-sys-color-on-primary-container: #FFFFFF;
}
/* High contrast */
[data-contrast="high"] {
--md-sys-color-primary: #2D0F6E;
--md-sys-color-on-primary: #FFFFFF;
--md-sys-color-primary-container: #4E3A87;
--md-sys-color-on-primary-container: #FFFFFF;
}
Interactive Elements:
Surfaces and Containers:
State Layers:
Emphasis and Brand:
When generating color schemes from a source color:
primary, error) rather than literal colors (e.g., blue, red)tokens.css: Ready-to-use M3 color tokens (light + dark) based on the orange baseline palette (#FF9800), included in this skill's directory. Copy into your project and customize.examples/color-roles.svg: Visual reference SVG showing M3 color roles (primary, secondary, tertiary, error), surface container tones, and the primary tonal palette. Use as a stakeholder reference or documentation asset.material-theme-builder skill: Use to generate a complete token set from any source color programmatically.When implementing M3 color systems, ensure:
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
development
Generate Material Design 3 color themes programmatically from a source color using @material/material-color-utilities, the same engine that powers the Material Theme Builder. Use this when the user asks to generate an M3 color palette, create a custom theme from a brand color, or export M3 tokens to CSS, JSON, or framework configs.
testing
Applies Material Design 3 Expressive typography principles including variable fonts, type scales, and hierarchy. Use this when working on text styling, type hierarchy, readable interfaces, or when the user asks to apply Material Design 3 typography guidelines.
testing
Applies Material Design 3 Expressive shape and containment principles including rounded corners, morphing shapes, and container design. Use this when working on component shapes, borders, containment, or when the user asks to apply Material Design 3 shape guidelines.