Token导航 LogoToken导航TokenDH.com
前端设计只读github未标认证来源可访问许可证需确认审计通过

material-design-3-color材质设计 3 色

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

364

周安装

15

GitHub Stars

2

下载量

119
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:material-design-3-color(材质设计 3 色)
来源仓库:https://github.com/shelbeely/shelbeely-agent-skills
仓库路径:skills/material-design-3-color
安装命令:
npx skills add https://github.com/shelbeely/shelbeely-agent-skills --skill material-design-3-color
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/shelbeely/shelbeely-agent-skills --skill material-design-3-color

简介

material-design-3-color 用于辅助界面设计、视觉规范、排版、配色和布局优化,适合生成 UI 方案或改进组件层级。

  • 适用于需要结合品牌与设计系统的视觉设计任务。
  • 通过 npx skills add 命令从 GitHub 仓库安装并使用该技能。
  • 使用时需结合现有品牌与用户任务,不应只堆装饰元素。
  • 涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出与对齐。

SKILL.md

Material Design 3 Color and Dynamic Theming

Overview

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

Core Principles

Dynamic Color System

Material Design 3's color system is built on the concept of dynamic color, allowing interfaces to adapt to user preferences and contexts:

  1. Tonal Palettes: Use five key tonal palettes (Primary, Secondary, Tertiary, Neutral, Neutral Variant) with multiple tones (0-100)
  2. Color Roles: Map 26+ color roles to UI elements (e.g., primary, onPrimary, primaryContainer, onPrimaryContainer)
  3. Adaptive Theming: Support both light and dark themes with appropriate contrast
  4. User Personalization: Allow color schemes to adapt based on user wallpaper or preferences (Material You)
  5. Fixed Accent Colors: Provide color tokens that remain consistent across light and dark themes for brand identity
  6. Emphasis Colors: Use bolder, more vibrant color roles for key UI elements to improve clarity and emotional resonance

Color Palette Structure

When creating color palettes, follow this structure:

Primary Palette (Main brand color):

  • Primary: Main interactive elements (buttons, active states)
  • On Primary: Text/icons on primary color
  • Primary Container: Standout fill color for key components
  • On Primary Container: Text/icons on primary container
  • Primary Fixed: Stays constant across light and dark themes
  • On Primary Fixed: Text/icons on primary fixed
  • Primary Fixed Dim: Dimmed variant for secondary emphasis on fixed surfaces

Secondary Palette (Complementary accent):

  • Secondary: Less prominent components
  • On Secondary: Text/icons on secondary
  • Secondary Container: Tinted backgrounds
  • On Secondary Container: Text/icons on secondary container
  • Secondary Fixed: Stays constant across light and dark themes
  • On Secondary Fixed: Text/icons on secondary fixed
  • Secondary Fixed Dim: Dimmed variant for fixed surfaces

Tertiary Palette (Contrasting accent — now a prominent expressive accent for branding and highlights):

  • Tertiary: Contrasting accents and highlights
  • On Tertiary: Text/icons on tertiary
  • Tertiary Container: Input elements
  • On Tertiary Container: Text/icons on tertiary container
  • Tertiary Fixed: Stays constant across light and dark themes
  • On Tertiary Fixed: Text/icons on tertiary fixed
  • Tertiary Fixed Dim: Dimmed variant for fixed surfaces

Neutral Palettes (Surfaces and backgrounds):

  • Surface: Default background for components
  • On Surface: Text on surface
  • Surface Variant: Alternate surface color
  • On Surface Variant: Text on surface variant
  • Surface Dim: Dimmed surface for reduced emphasis
  • Surface Bright: Brighter surface for increased emphasis
  • Surface Container Lowest: Lowest-emphasis container surface
  • Surface Container Low: Low-emphasis container surface
  • Surface Container: Default container surface
  • Surface Container High: High-emphasis container surface
  • Surface Container Highest: Highest-emphasis container surface
  • Outline: Borders and dividers
  • Outline Variant: Decorative elements
  • Inverse Surface: Inverted surface for contrast elements (e.g., snackbars)
  • Inverse On Surface: Text on inverse surface
  • Inverse Primary: Primary color used on inverse surfaces

Error/Warning/Success (Feedback colors):

  • Error, Warning, Success with corresponding "On" colors and containers

Accessibility Guidelines

  1. Contrast Levels (M3 Expressive standardizes three levels):

- Standard: Default contrast suitable for most users - Medium: Enhanced contrast for improved readability - High: Maximum contrast for users with low vision or high-contrast preferences - All three levels are tokenized for easy implementation

  1. Contrast Requirements:

- Text contrast: Minimum 4.5:1 for body text, 3:1 for large text (WCAG AA) - Interactive elements: Minimum 3:1 contrast with background - Use "On" colors to ensure proper contrast

  1. Color Independence:

- Never rely solely on color to convey information - Use icons, text labels, or patterns alongside color - Ensure color-blind friendly combinations

  1. Dynamic Range:

- Light theme: Higher tones (90-99) for surfaces, lower tones (10-40) for emphasis - Dark theme: Lower tones (10-20) for surfaces, higher tones (80-90) for emphasis

Implementation Guidelines

Color Token System

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

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);
}

Contrast Level System

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;
}

Color Application

  1. Interactive Elements:

- Filled buttons: Use primary color with on-primary text - Outlined buttons: Use outline with primary text - Text buttons: Use primary text only - FABs: Use primary-container with on-primary-container - Button Groups: Use surface-container with on-surface text

  1. Surfaces and Containers:

- Main background: surface - Elevated components (cards, dialogs): surface-container variants - Input fields: surface-container-highest - Snackbars: inverse-surface with inverse-on-surface text - Bottom sheets: surface-container-low

  1. State Layers:

- Hover: Apply 8% opacity layer of on-surface - Focus: Apply 12% opacity layer of on-surface - Pressed: Apply 12% opacity layer of on-surface - Dragged: Apply 16% opacity layer of on-surface

  1. Emphasis and Brand:

- Use fixed accent colors for brand elements that must remain consistent - Apply emphasis through color saturation and contrast, not just hue - Use tertiary as an expressive accent for onboarding, highlights, and branding

Dynamic Color Generation

When generating color schemes from a source color:

  1. Extract Core Hue: Identify the dominant hue from the source (e.g., user wallpaper)
  2. Generate Tonal Palettes: Create five tonal palettes using HCT (Hue, Chroma, Tone) color space
  3. Assign Color Roles: Map generated tones to semantic color roles (26+ roles)
  4. Generate Fixed Variants: Create fixed accent colors that remain constant across themes
  5. Generate Surface Containers: Create the five-level surface container hierarchy
  6. Generate Contrast Variants: Produce standard, medium, and high contrast versions
  7. Validate Contrast: Ensure all role pairs meet accessibility requirements
  8. Support Themes: Generate both light and dark variants

Best Practices

  1. Semantic Naming: Always use semantic color tokens (e.g., primary, error) rather than literal colors (e.g., blue, red)
  2. Consistent Application: Apply colors consistently across all components
  3. Elevation Tinting: Add subtle tint to elevated surfaces using primary color at very low opacity
  4. Color Hierarchy: Use primary for main actions, secondary for less important actions, tertiary for expressive accents
  5. Test Both Themes: Always test in both light and dark modes
  6. Vibrant Expression: In M3 Expressive, embrace richer, more vibrant colors while maintaining accessibility
  7. Context Awareness: Adapt color intensity and palette based on app context and user preferences
  8. Use Fixed Colors for Branding: Apply fixed accent tokens for logo colors or elements that must not change between themes
  9. Support Contrast Levels: Implement standard, medium, and high contrast variants for accessibility
  10. Surface Container Hierarchy: Use the five surface container levels to create clear visual depth

Tools and Resources

Common Pitfalls to Avoid

  1. ❌ Hard-coding color values instead of using tokens
  2. ❌ Using only one color for all states (no hover, focus, pressed variations)
  3. ❌ Ignoring dark theme or treating it as an afterthought
  4. ❌ Insufficient contrast between text and background
  5. ❌ Overusing accent colors (they should be used sparingly for emphasis)
  6. ❌ Not testing with actual user-generated color schemes
  7. ❌ Relying only on color to communicate state or information
  8. ❌ Forgetting to define fixed accent colors for brand elements
  9. ❌ Not implementing multiple contrast levels for accessibility
  10. ❌ Using surface instead of the appropriate surface container variant

Checklist for Color Implementation

When implementing M3 color systems, ensure:

  • All five tonal palettes are defined (Primary, Secondary, Tertiary, Neutral, Neutral Variant)
  • Both light and dark themes are implemented
  • All color pairs meet WCAG contrast requirements
  • Semantic color tokens are used throughout (no hard-coded hex values)
  • State layers (hover, focus, pressed) are implemented with appropriate opacity
  • Elevation tinting is applied to raised surfaces
  • Color scheme can be dynamically generated from user source colors
  • All components use color roles consistently
  • Color is not the only indicator of state or information
  • Fixed accent colors are defined for branding elements (primary-fixed, secondary-fixed, tertiary-fixed)
  • Surface container hierarchy is implemented (lowest through highest)
  • Inverse colors are defined for contrast elements (snackbars, tooltips)
  • Three contrast levels are supported (standard, medium, high)
  • Scrim and shadow tokens are defined
  • Documentation includes color token reference and usage guidelines

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.3%
按下载量换算42

Claude

30.02%
按下载量换算36

Cursor

17.93%
按下载量换算21

Gemini CLI

10.11%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills