Uno Themes Semantic Design Language
This skill is the definitive reference for the Semantic Design Language in Uno Themes. The semantic system is design-theme agnostic -- the same style keys, typography keys, color keys, and brush keys are shared across every design-theme implementation. Each implementation supplies its own concrete values and may not implement every key, but the semantic names are shared. Consult the design-theme-specific skills for concrete styles, palettes, and theme-only extensions.
Part 1: Semantic Control Styles
How It Works
Each design-theme's _Resources.xaml defines <StaticResource> aliases that map the shared semantic key to the theme's concrete style (e.g. FilledButtonStyle -> {ThemePrefix}FilledButtonStyle).
Use semantic keys in XAML for portable, theme-agnostic styling:
<Button Style="{StaticResource FilledButtonStyle}" Content="Save" />
Complete Style Key Reference
| Semantic Key |
Control |
Default |
Notes |
FilledButtonStyle |
Button |
Yes |
|
ElevatedButtonStyle |
Button |
|
Not implemented by every design-theme |
FilledTonalButtonStyle |
Button |
|
|
OutlinedButtonStyle |
Button |
|
Not implemented by every design-theme |
TextButtonStyle |
Button |
|
|
IconButtonStyle |
Button |
|
|
TextToggleButtonStyle |
ToggleButton |
|
|
IconToggleButtonStyle |
ToggleButton |
Yes |
Default implicit for ToggleButton |
FilledTextBoxStyle |
TextBox |
|
|
OutlinedTextBoxStyle |
TextBox |
|
Implicit default in some design-themes |
FilledPasswordBoxStyle |
PasswordBox |
|
|
OutlinedPasswordBoxStyle |
PasswordBox |
|
Implicit default in some design-themes |
ComboBoxStyle |
ComboBox |
Yes |
|
ComboBoxItemStyle |
ComboBoxItem |
|
|
CheckBoxStyle |
CheckBox |
Yes |
|
RadioButtonStyle |
RadioButton |
Yes |
|
ToggleSwitchStyle |
ToggleSwitch |
Yes |
|
SliderStyle |
Slider |
Yes |
|
HyperlinkButtonStyle |
HyperlinkButton |
Yes |
|
SecondaryHyperlinkButtonStyle |
HyperlinkButton |
|
|
ListViewStyle |
ListView |
Yes |
|
ListViewItemStyle |
ListViewItem |
Yes |
|
ContentDialogStyle |
ContentDialog |
Yes |
|
CommandBarStyle |
CommandBar |
Yes |
Not implemented by every design-theme |
AppBarButtonStyle |
AppBarButton |
Yes |
|
NavigationViewStyle |
NavigationView |
Yes |
|
NavigationViewItemStyle |
NavigationViewItem |
Yes |
|
CalendarViewStyle |
CalendarView |
Yes |
|
CalendarDatePickerStyle |
CalendarDatePicker |
Yes |
|
DatePickerStyle |
DatePicker |
Yes |
|
DatePickerFlyoutPresenterStyle |
DatePickerFlyoutPresenter |
Yes |
Not implemented by every design-theme |
MediaTransportControlsStyle |
MediaTransportControls |
Yes |
Not implemented by every design-theme |
ProgressBarStyle |
ProgressBar |
Yes |
|
ProgressRingStyle |
ProgressRing |
Yes |
|
PipsPagerStyle |
PipsPager |
Yes |
|
RatingControlStyle |
RatingControl |
Yes |
|
FlyoutPresenterStyle |
FlyoutPresenter |
Yes |
|
MenuFlyoutPresenterStyle |
MenuFlyoutPresenter |
Yes |
|
MenuFlyoutItemStyle |
MenuFlyoutItem |
Yes |
|
MenuFlyoutSeparatorStyle |
MenuFlyoutSeparator |
Yes |
|
MenuFlyoutSubItemStyle |
MenuFlyoutSubItem |
Yes |
|
ToggleMenuFlyoutItemStyle |
ToggleMenuFlyoutItem |
Yes |
|
RadioMenuFlyoutItemStyle |
RadioMenuFlyoutItem |
Yes |
|
FAB Styles
| Semantic Key |
Control |
Notes |
FabStyle |
Button |
Primary FAB |
SmallFabStyle |
Button |
|
LargeFabStyle |
Button |
|
SecondaryFabStyle |
Button |
|
SecondarySmallFabStyle |
Button |
|
SecondaryLargeFabStyle |
Button |
|
TertiaryFabStyle |
Button |
|
TertiarySmallFabStyle |
Button |
|
TertiaryLargeFabStyle |
Button |
|
SurfaceFabStyle |
Button |
|
SurfaceSmallFabStyle |
Button |
|
SurfaceLargeFabStyle |
Button |
|
Note: Individual design-themes may also expose additional theme-prefixed styles (e.g. danger variants, size variants, controls without a cross-theme equivalent) that are not part of the shared semantic surface. See the design-theme-specific skills for those.
Part 2: Semantic Typography
Each design-theme provides semantic typography keys based on the M3 type scale. Concrete font families, sizes, and weights are supplied by the active design-theme's Typography.xaml; the semantic key names are shared.
Typography Style Keys
Use these as TextBlock styles:
<TextBlock Style="{StaticResource DisplayLarge}" Text="Hero" />
<TextBlock Style="{StaticResource BodyMedium}" Text="Body text" />
Font Resource Keys
Each typography style exposes individual font properties for lightweight styling:
| Style Key |
Font Resource Keys |
DisplayLarge |
DisplayLargeFontFamily, DisplayLargeFontSize, DisplayLargeFontWeight, DisplayLargeCharacterSpacing |
DisplayMedium |
DisplayMediumFontFamily, DisplayMediumFontSize, DisplayMediumFontWeight |
DisplaySmall |
DisplaySmallFontFamily, DisplaySmallFontSize, DisplaySmallFontWeight |
HeadlineLarge |
HeadlineLargeFontFamily, HeadlineLargeFontSize, HeadlineLargeFontWeight |
HeadlineMedium |
HeadlineMediumFontFamily, HeadlineMediumFontSize, HeadlineMediumFontWeight |
HeadlineSmall |
HeadlineSmallFontFamily, HeadlineSmallFontSize, HeadlineSmallFontWeight |
TitleLarge |
TitleLargeFontFamily, TitleLargeFontSize, TitleLargeFontWeight |
TitleMedium |
TitleMediumFontFamily, TitleMediumFontSize, TitleMediumFontWeight |
TitleSmall |
TitleSmallFontFamily, TitleSmallFontSize, TitleSmallFontWeight |
BodyLarge |
BodyLargeFontFamily, BodyLargeFontSize, BodyLargeFontWeight |
BodyMedium |
BodyMediumFontFamily, BodyMediumFontSize, BodyMediumFontWeight |
BodySmall |
BodySmallFontFamily, BodySmallFontSize, BodySmallFontWeight |
LabelLarge |
LabelLargeFontFamily, LabelLargeFontSize, LabelLargeFontWeight |
LabelMedium |
LabelMediumFontFamily, LabelMediumFontSize, LabelMediumFontWeight |
LabelSmall |
LabelSmallFontFamily, LabelSmallFontSize, LabelSmallFontWeight |
LabelExtraSmall |
LabelExtraSmallFontFamily, LabelExtraSmallFontSize, LabelExtraSmallFontWeight |
CaptionLarge |
CaptionLargeFontFamily, CaptionLargeFontSize, CaptionLargeFontWeight |
CaptionMedium |
CaptionMediumFontFamily, CaptionMediumFontSize, CaptionMediumFontWeight |
CaptionSmall |
CaptionSmallFontFamily, CaptionSmallFontSize, CaptionSmallFontWeight |
Typography Decision Guide
| Purpose |
Style Key |
| Hero / splash text |
DisplayLarge |
| Page title |
DisplayMedium or HeadlineLarge |
| Section heading |
HeadlineMedium or HeadlineSmall |
| Card / dialog title |
TitleLarge or TitleMedium |
| Button / tab label |
LabelLarge |
| Primary body text |
BodyLarge |
| Secondary body text |
BodyMedium |
| Caption / helper text |
CaptionMedium or BodySmall |
| Badge / small label |
LabelSmall or LabelExtraSmall |
Part 3: Semantic Colors & Brushes
Architecture: Three Layers
Layer 1: Color Palette (SharedColorPalette.xaml)
33 Color resources with Light/Dark theme variants
|
v
Layer 2: Semantic Brushes (SharedColors.xaml)
~288 SolidColorBrush resources generated from palette + opacity tokens
|
v
Layer 3: Control Lightweight Styling Keys
Per-control resource keys that reference semantic brushes
(e.g., FilledButtonBackground -> PrimaryBrush)
- Override Layer 1 to rebrand the entire app (all brushes cascade automatically).
- Override Layer 2 to change a specific brush without affecting the palette.
- Override Layer 3 to change a single control's appearance without affecting the brush system.
The Color Palette (Layer 1)
Defined in SharedColorPalette.xaml, these 33 Color resources are the foundation.
Primary -- Brand Identity & Key Actions
| Color Key |
Role |
When to Use |
PrimaryColor |
Hero brand color |
Filled button backgrounds, active toggle states, FAB backgrounds |
OnPrimaryColor |
Content on Primary |
Text and icons on Primary surfaces |
PrimaryContainerColor |
Softer primary fill |
Tonal button backgrounds, selected navigation items, chips |
OnPrimaryContainerColor |
Content on Primary Container |
Text and icons on PrimaryContainer surfaces |
PrimaryInverseColor |
Inverted primary accent |
Links on inverse surfaces (e.g., dark snackbar) |
Legacy Primary Variants
| Color Key |
Role |
PrimaryVariantDarkColor |
Darker primary shade (M2 compat) |
PrimaryVariantLightColor |
Lighter primary shade (M2 compat) |
Secondary -- Supporting Accents
| Color Key |
Role |
When to Use |
SecondaryColor |
Supporting accent |
Filter chips, secondary action buttons |
OnSecondaryColor |
Content on Secondary |
Text and icons on Secondary surfaces |
SecondaryContainerColor |
Softer secondary fill |
NavigationView selected item, info banners |
OnSecondaryContainerColor |
Content on Secondary Container |
Text and icons on SecondaryContainer |
Legacy Secondary Variants
| Color Key |
Role |
SecondaryVariantDarkColor |
Darker secondary shade (M2 compat) |
SecondaryVariantLightColor |
Lighter secondary shade (M2 compat) |
Tertiary -- Contrast & Balance
| Color Key |
Role |
When to Use |
TertiaryColor |
Third accent |
Tertiary FABs, accents distinct from Primary and Secondary |
OnTertiaryColor |
Content on Tertiary |
Text and icons on Tertiary surfaces |
TertiaryContainerColor |
Softer tertiary fill |
Complementary cards, input fields |
OnTertiaryContainerColor |
Content on Tertiary Container |
Text and icons on TertiaryContainer |
Error -- Validation & Destructive Actions
| Color Key |
Role |
When to Use |
ErrorColor |
Danger/error accent |
Error text, destructive button backgrounds |
OnErrorColor |
Content on Error |
Text and icons on Error surfaces |
ErrorContainerColor |
Softer error fill |
Error banners, validation backgrounds |
OnErrorContainerColor |
Content on Error Container |
Text and icons on ErrorContainer |
Surface -- Component Backgrounds
| Color Key |
Role |
When to Use |
SurfaceColor |
Default component background |
Cards, dialogs, sheets, menus |
OnSurfaceColor |
Primary text/icons |
Highest-emphasis content: titles, body text |
SurfaceVariantColor |
Differentiated surface |
ToggleSwitch tracks, Slider tracks, subtle section backgrounds |
OnSurfaceVariantColor |
Secondary text/icons |
Helper text, captions, lower-emphasis icons |
SurfaceInverseColor |
Inverted surface |
Snackbars, tooltips |
OnSurfaceInverseColor |
Content on inverse surface |
Text on snackbars and tooltips |
SurfaceTintColor |
Elevation tint |
Tint overlay for elevated surfaces |
Background, Outline, Shadow
| Color Key |
Role |
BackgroundColor |
Root page background |
OnBackgroundColor |
Content on background |
OutlineColor |
Interactive boundaries (button borders, input outlines) |
OutlineVariantColor |
Decorative boundaries (card edges, dividers) |
ShadowColor |
Drop shadow color |
The Brush System (Layer 2)
Every Color key generates 9 SolidColorBrush variants at different opacity levels.
Brush Naming Pattern: {ColorRole}{StateVariant}Brush
| Suffix |
Opacity |
Purpose |
| (none) |
1.0 |
Default/rest state |
Hover |
0.08 |
Pointer hover state layer |
Focused |
0.12 |
Keyboard focus state layer |
Pressed |
0.12 |
Active press state layer |
Dragged |
0.16 |
Drag operation state layer |
Selected |
0.08 |
Selected item state layer |
Medium |
0.64 |
Medium-emphasis text/icons |
Low |
0.32 |
Low-emphasis text, placeholders |
Disabled |
0.12 |
Disabled state backgrounds |
Total: ~288 semantic brushes across Primary (63), Secondary (54), Tertiary (36), Error (36), Surface (63), Background (18), Outline (18).
Color Pairing Rules (CRITICAL)
NEVER mix unpaired colors. Every background role has a designated "On" foreground role.
| If Background Is... |
Then Foreground MUST Be... |
PrimaryBrush |
OnPrimaryBrush |
PrimaryContainerBrush |
OnPrimaryContainerBrush |
SecondaryBrush |
OnSecondaryBrush |
SecondaryContainerBrush |
OnSecondaryContainerBrush |
TertiaryBrush |
OnTertiaryBrush |
TertiaryContainerBrush |
OnTertiaryContainerBrush |
ErrorBrush |
OnErrorBrush |
ErrorContainerBrush |
OnErrorContainerBrush |
SurfaceBrush |
OnSurfaceBrush or OnSurfaceVariantBrush |
SurfaceVariantBrush |
OnSurfaceVariantBrush |
BackgroundBrush |
OnBackgroundBrush |
SurfaceInverseBrush |
OnSurfaceInverseBrush |
Text Emphasis on Surfaces
| Emphasis |
Brush |
Use For |
| High |
OnSurfaceBrush |
Titles, headings, primary labels |
| Medium |
OnSurfaceVariantBrush |
Body text, secondary labels, captions |
| Low / Disabled |
OnSurfaceLowBrush |
Disabled text, placeholder text |
Part 4: Customization
Method 1: Override Color Palette (Full Cascade)
Override *Color keys in a ResourceDictionary referenced by your theme. All ~288 brushes and controls update automatically.
Always provide both Light and Default (Dark) theme values.
Method 2: Override Specific Brushes (Targeted)
<SolidColorBrush x:Key="FilledButtonBackground" Color="#006D3B" />
Method 3: Override Per-Control Instance (Scoped)
<Button Style="{StaticResource FilledButtonStyle}">
<Button.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="FilledButtonBackground" Color="#006D3B" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Button.Resources>
</Button>
Customization Precedence (Highest to Lowest)
- Control.Resources -- per-instance
- Page.Resources -- page-scoped
- App-level overrides -- app-wide
- Theme defaults -- active design-theme
- SharedColorPalette / SharedColors / SharedTypography -- foundation
Decision Guides
Which Color Role?
| Scenario |
Background |
Foreground |
| Primary CTA ("Submit") |
PrimaryBrush |
OnPrimaryBrush |
| Tonal action |
SecondaryContainerBrush |
OnSecondaryContainerBrush |
| Outlined button border |
OutlineBrush |
PrimaryBrush |
| Text-only action |
Transparent |
PrimaryBrush |
| Destructive ("Delete") |
ErrorBrush |
OnErrorBrush |
| Card / Dialog |
SurfaceBrush |
OnSurfaceBrush |
| Error banner |
ErrorContainerBrush |
OnErrorContainerBrush |
| Snackbar / Tooltip |
SurfaceInverseBrush |
OnSurfaceInverseBrush |
Which Button Style?
| Scenario |
Style Key |
| Primary action |
FilledButtonStyle |
| Secondary action |
FilledTonalButtonStyle or OutlinedButtonStyle |
| Tertiary / low emphasis |
TextButtonStyle |
| Icon-only action |
IconButtonStyle |
XAML Best Practices
- Always use
ThemeResource (not StaticResource) for brushes so they respond to theme changes.
- Always use
StaticResource for styles (styles don't change with theme).
- Use semantic keys, not theme-prefixed keys, for portable XAML.
<!-- Correct -->
<Button Style="{StaticResource FilledButtonStyle}"
Content="Save" />
<!-- Avoid theme-prefixed keys in portable code -->
<!-- <Button Style="{StaticResource {ThemePrefix}FilledButtonStyle}" /> -->
1---2name: uno-themes-semantic-colors-brushes3description: Comprehensive reference for the Uno Themes Semantic Design Language. Covers semantic control styles, typography, 33 color palette keys, ~288 generated brushes, opacity/state system, color pairing rules, and theme customization.4---56# Uno Themes Semantic Design Language78This skill is the definitive reference for the **Semantic Design Language** in Uno Themes. The semantic system is **design-theme agnostic** -- the same style keys, typography keys, color keys, and brush keys are shared across every design-theme implementation. Each implementation supplies its own concrete values and may not implement every key, but the semantic names are shared. Consult the design-theme-specific skills for concrete styles, palettes, and theme-only extensions.910---1112## Part 1: Semantic Control Styles1314### How It Works1516Each design-theme's `_Resources.xaml` defines `<StaticResource>` aliases that map the shared semantic key to the theme's concrete style (e.g. `FilledButtonStyle` -> `{ThemePrefix}FilledButtonStyle`).1718Use semantic keys in XAML for portable, theme-agnostic styling:1920```xml21<Button Style="{StaticResource FilledButtonStyle}" Content="Save" />22```2324### Complete Style Key Reference2526| Semantic Key | Control | Default | Notes |27|---|---|---|---|28| `FilledButtonStyle` | `Button` | Yes | |29| `ElevatedButtonStyle` | `Button` | | Not implemented by every design-theme |30| `FilledTonalButtonStyle` | `Button` | | |31| `OutlinedButtonStyle` | `Button` | | Not implemented by every design-theme |32| `TextButtonStyle` | `Button` | | |33| `IconButtonStyle` | `Button` | | |34| `TextToggleButtonStyle` | `ToggleButton` | | |35| `IconToggleButtonStyle` | `ToggleButton` | Yes | Default implicit for ToggleButton |36| `FilledTextBoxStyle` | `TextBox` | | |37| `OutlinedTextBoxStyle` | `TextBox` | | Implicit default in some design-themes |38| `FilledPasswordBoxStyle` | `PasswordBox` | | |39| `OutlinedPasswordBoxStyle` | `PasswordBox` | | Implicit default in some design-themes |40| `ComboBoxStyle` | `ComboBox` | Yes | |41| `ComboBoxItemStyle` | `ComboBoxItem` | | |42| `CheckBoxStyle` | `CheckBox` | Yes | |43| `RadioButtonStyle` | `RadioButton` | Yes | |44| `ToggleSwitchStyle` | `ToggleSwitch` | Yes | |45| `SliderStyle` | `Slider` | Yes | |46| `HyperlinkButtonStyle` | `HyperlinkButton` | Yes | |47| `SecondaryHyperlinkButtonStyle` | `HyperlinkButton` | | |48| `ListViewStyle` | `ListView` | Yes | |49| `ListViewItemStyle` | `ListViewItem` | Yes | |50| `ContentDialogStyle` | `ContentDialog` | Yes | |51| `CommandBarStyle` | `CommandBar` | Yes | Not implemented by every design-theme |52| `AppBarButtonStyle` | `AppBarButton` | Yes | |53| `NavigationViewStyle` | `NavigationView` | Yes | |54| `NavigationViewItemStyle` | `NavigationViewItem` | Yes | |55| `CalendarViewStyle` | `CalendarView` | Yes | |56| `CalendarDatePickerStyle` | `CalendarDatePicker` | Yes | |57| `DatePickerStyle` | `DatePicker` | Yes | |58| `DatePickerFlyoutPresenterStyle` | `DatePickerFlyoutPresenter` | Yes | Not implemented by every design-theme |59| `MediaTransportControlsStyle` | `MediaTransportControls` | Yes | Not implemented by every design-theme |60| `ProgressBarStyle` | `ProgressBar` | Yes | |61| `ProgressRingStyle` | `ProgressRing` | Yes | |62| `PipsPagerStyle` | `PipsPager` | Yes | |63| `RatingControlStyle` | `RatingControl` | Yes | |64| `FlyoutPresenterStyle` | `FlyoutPresenter` | Yes | |65| `MenuFlyoutPresenterStyle` | `MenuFlyoutPresenter` | Yes | |66| `MenuFlyoutItemStyle` | `MenuFlyoutItem` | Yes | |67| `MenuFlyoutSeparatorStyle` | `MenuFlyoutSeparator` | Yes | |68| `MenuFlyoutSubItemStyle` | `MenuFlyoutSubItem` | Yes | |69| `ToggleMenuFlyoutItemStyle` | `ToggleMenuFlyoutItem` | Yes | |70| `RadioMenuFlyoutItemStyle` | `RadioMenuFlyoutItem` | Yes | |7172#### FAB Styles7374| Semantic Key | Control | Notes |75|---|---|---|76| `FabStyle` | `Button` | Primary FAB |77| `SmallFabStyle` | `Button` | |78| `LargeFabStyle` | `Button` | |79| `SecondaryFabStyle` | `Button` | |80| `SecondarySmallFabStyle` | `Button` | |81| `SecondaryLargeFabStyle` | `Button` | |82| `TertiaryFabStyle` | `Button` | |83| `TertiarySmallFabStyle` | `Button` | |84| `TertiaryLargeFabStyle` | `Button` | |85| `SurfaceFabStyle` | `Button` | |86| `SurfaceSmallFabStyle` | `Button` | |87| `SurfaceLargeFabStyle` | `Button` | |8889> **Note:** Individual design-themes may also expose additional theme-prefixed styles (e.g. danger variants, size variants, controls without a cross-theme equivalent) that are **not** part of the shared semantic surface. See the design-theme-specific skills for those.9091---9293## Part 2: Semantic Typography9495Each design-theme provides semantic typography keys based on the M3 type scale. Concrete font families, sizes, and weights are supplied by the active design-theme's `Typography.xaml`; the semantic key names are shared.9697### Typography Style Keys9899Use these as TextBlock styles:100101```xml102<TextBlock Style="{StaticResource DisplayLarge}" Text="Hero" />103<TextBlock Style="{StaticResource BodyMedium}" Text="Body text" />104```105106### Font Resource Keys107108Each typography style exposes individual font properties for lightweight styling:109110| Style Key | Font Resource Keys |111|---|---|112| `DisplayLarge` | `DisplayLargeFontFamily`, `DisplayLargeFontSize`, `DisplayLargeFontWeight`, `DisplayLargeCharacterSpacing` |113| `DisplayMedium` | `DisplayMediumFontFamily`, `DisplayMediumFontSize`, `DisplayMediumFontWeight` |114| `DisplaySmall` | `DisplaySmallFontFamily`, `DisplaySmallFontSize`, `DisplaySmallFontWeight` |115| `HeadlineLarge` | `HeadlineLargeFontFamily`, `HeadlineLargeFontSize`, `HeadlineLargeFontWeight` |116| `HeadlineMedium` | `HeadlineMediumFontFamily`, `HeadlineMediumFontSize`, `HeadlineMediumFontWeight` |117| `HeadlineSmall` | `HeadlineSmallFontFamily`, `HeadlineSmallFontSize`, `HeadlineSmallFontWeight` |118| `TitleLarge` | `TitleLargeFontFamily`, `TitleLargeFontSize`, `TitleLargeFontWeight` |119| `TitleMedium` | `TitleMediumFontFamily`, `TitleMediumFontSize`, `TitleMediumFontWeight` |120| `TitleSmall` | `TitleSmallFontFamily`, `TitleSmallFontSize`, `TitleSmallFontWeight` |121| `BodyLarge` | `BodyLargeFontFamily`, `BodyLargeFontSize`, `BodyLargeFontWeight` |122| `BodyMedium` | `BodyMediumFontFamily`, `BodyMediumFontSize`, `BodyMediumFontWeight` |123| `BodySmall` | `BodySmallFontFamily`, `BodySmallFontSize`, `BodySmallFontWeight` |124| `LabelLarge` | `LabelLargeFontFamily`, `LabelLargeFontSize`, `LabelLargeFontWeight` |125| `LabelMedium` | `LabelMediumFontFamily`, `LabelMediumFontSize`, `LabelMediumFontWeight` |126| `LabelSmall` | `LabelSmallFontFamily`, `LabelSmallFontSize`, `LabelSmallFontWeight` |127| `LabelExtraSmall` | `LabelExtraSmallFontFamily`, `LabelExtraSmallFontSize`, `LabelExtraSmallFontWeight` |128| `CaptionLarge` | `CaptionLargeFontFamily`, `CaptionLargeFontSize`, `CaptionLargeFontWeight` |129| `CaptionMedium` | `CaptionMediumFontFamily`, `CaptionMediumFontSize`, `CaptionMediumFontWeight` |130| `CaptionSmall` | `CaptionSmallFontFamily`, `CaptionSmallFontSize`, `CaptionSmallFontWeight` |131132### Typography Decision Guide133134| Purpose | Style Key |135|---------|-----------|136| Hero / splash text | `DisplayLarge` |137| Page title | `DisplayMedium` or `HeadlineLarge` |138| Section heading | `HeadlineMedium` or `HeadlineSmall` |139| Card / dialog title | `TitleLarge` or `TitleMedium` |140| Button / tab label | `LabelLarge` |141| Primary body text | `BodyLarge` |142| Secondary body text | `BodyMedium` |143| Caption / helper text | `CaptionMedium` or `BodySmall` |144| Badge / small label | `LabelSmall` or `LabelExtraSmall` |145146---147148## Part 3: Semantic Colors & Brushes149150### Architecture: Three Layers151152```153Layer 1: Color Palette (SharedColorPalette.xaml)154 33 Color resources with Light/Dark theme variants155 |156 v157Layer 2: Semantic Brushes (SharedColors.xaml)158 ~288 SolidColorBrush resources generated from palette + opacity tokens159 |160 v161Layer 3: Control Lightweight Styling Keys162 Per-control resource keys that reference semantic brushes163 (e.g., FilledButtonBackground -> PrimaryBrush)164```165166- **Override Layer 1** to rebrand the entire app (all brushes cascade automatically).167- **Override Layer 2** to change a specific brush without affecting the palette.168- **Override Layer 3** to change a single control's appearance without affecting the brush system.169170### The Color Palette (Layer 1)171172Defined in `SharedColorPalette.xaml`, these 33 `Color` resources are the foundation.173174#### Primary -- Brand Identity & Key Actions175176| Color Key | Role | When to Use |177|-----------|------|-------------|178| `PrimaryColor` | Hero brand color | Filled button backgrounds, active toggle states, FAB backgrounds |179| `OnPrimaryColor` | Content on Primary | Text and icons on Primary surfaces |180| `PrimaryContainerColor` | Softer primary fill | Tonal button backgrounds, selected navigation items, chips |181| `OnPrimaryContainerColor` | Content on Primary Container | Text and icons on PrimaryContainer surfaces |182| `PrimaryInverseColor` | Inverted primary accent | Links on inverse surfaces (e.g., dark snackbar) |183184#### Legacy Primary Variants185186| Color Key | Role |187|-----------|------|188| `PrimaryVariantDarkColor` | Darker primary shade (M2 compat) |189| `PrimaryVariantLightColor` | Lighter primary shade (M2 compat) |190191#### Secondary -- Supporting Accents192193| Color Key | Role | When to Use |194|-----------|------|-------------|195| `SecondaryColor` | Supporting accent | Filter chips, secondary action buttons |196| `OnSecondaryColor` | Content on Secondary | Text and icons on Secondary surfaces |197| `SecondaryContainerColor` | Softer secondary fill | NavigationView selected item, info banners |198| `OnSecondaryContainerColor` | Content on Secondary Container | Text and icons on SecondaryContainer |199200#### Legacy Secondary Variants201202| Color Key | Role |203|-----------|------|204| `SecondaryVariantDarkColor` | Darker secondary shade (M2 compat) |205| `SecondaryVariantLightColor` | Lighter secondary shade (M2 compat) |206207#### Tertiary -- Contrast & Balance208209| Color Key | Role | When to Use |210|-----------|------|-------------|211| `TertiaryColor` | Third accent | Tertiary FABs, accents distinct from Primary and Secondary |212| `OnTertiaryColor` | Content on Tertiary | Text and icons on Tertiary surfaces |213| `TertiaryContainerColor` | Softer tertiary fill | Complementary cards, input fields |214| `OnTertiaryContainerColor` | Content on Tertiary Container | Text and icons on TertiaryContainer |215216#### Error -- Validation & Destructive Actions217218| Color Key | Role | When to Use |219|-----------|------|-------------|220| `ErrorColor` | Danger/error accent | Error text, destructive button backgrounds |221| `OnErrorColor` | Content on Error | Text and icons on Error surfaces |222| `ErrorContainerColor` | Softer error fill | Error banners, validation backgrounds |223| `OnErrorContainerColor` | Content on Error Container | Text and icons on ErrorContainer |224225#### Surface -- Component Backgrounds226227| Color Key | Role | When to Use |228|-----------|------|-------------|229| `SurfaceColor` | Default component background | Cards, dialogs, sheets, menus |230| `OnSurfaceColor` | Primary text/icons | Highest-emphasis content: titles, body text |231| `SurfaceVariantColor` | Differentiated surface | ToggleSwitch tracks, Slider tracks, subtle section backgrounds |232| `OnSurfaceVariantColor` | Secondary text/icons | Helper text, captions, lower-emphasis icons |233| `SurfaceInverseColor` | Inverted surface | Snackbars, tooltips |234| `OnSurfaceInverseColor` | Content on inverse surface | Text on snackbars and tooltips |235| `SurfaceTintColor` | Elevation tint | Tint overlay for elevated surfaces |236237#### Background, Outline, Shadow238239| Color Key | Role |240|-----------|------|241| `BackgroundColor` | Root page background |242| `OnBackgroundColor` | Content on background |243| `OutlineColor` | Interactive boundaries (button borders, input outlines) |244| `OutlineVariantColor` | Decorative boundaries (card edges, dividers) |245| `ShadowColor` | Drop shadow color |246247### The Brush System (Layer 2)248249Every Color key generates **9 SolidColorBrush variants** at different opacity levels.250251#### Brush Naming Pattern: `{ColorRole}{StateVariant}Brush`252253| Suffix | Opacity | Purpose |254|--------|---------|---------|255| *(none)* | 1.0 | Default/rest state |256| `Hover` | 0.08 | Pointer hover state layer |257| `Focused` | 0.12 | Keyboard focus state layer |258| `Pressed` | 0.12 | Active press state layer |259| `Dragged` | 0.16 | Drag operation state layer |260| `Selected` | 0.08 | Selected item state layer |261| `Medium` | 0.64 | Medium-emphasis text/icons |262| `Low` | 0.32 | Low-emphasis text, placeholders |263| `Disabled` | 0.12 | Disabled state backgrounds |264265**Total: ~288 semantic brushes** across Primary (63), Secondary (54), Tertiary (36), Error (36), Surface (63), Background (18), Outline (18).266267### Color Pairing Rules (CRITICAL)268269**NEVER mix unpaired colors.** Every background role has a designated "On" foreground role.270271| If Background Is... | Then Foreground MUST Be... |272|----------------------|---------------------------|273| `PrimaryBrush` | `OnPrimaryBrush` |274| `PrimaryContainerBrush` | `OnPrimaryContainerBrush` |275| `SecondaryBrush` | `OnSecondaryBrush` |276| `SecondaryContainerBrush` | `OnSecondaryContainerBrush` |277| `TertiaryBrush` | `OnTertiaryBrush` |278| `TertiaryContainerBrush` | `OnTertiaryContainerBrush` |279| `ErrorBrush` | `OnErrorBrush` |280| `ErrorContainerBrush` | `OnErrorContainerBrush` |281| `SurfaceBrush` | `OnSurfaceBrush` or `OnSurfaceVariantBrush` |282| `SurfaceVariantBrush` | `OnSurfaceVariantBrush` |283| `BackgroundBrush` | `OnBackgroundBrush` |284| `SurfaceInverseBrush` | `OnSurfaceInverseBrush` |285286### Text Emphasis on Surfaces287288| Emphasis | Brush | Use For |289|----------|-------|---------|290| High | `OnSurfaceBrush` | Titles, headings, primary labels |291| Medium | `OnSurfaceVariantBrush` | Body text, secondary labels, captions |292| Low / Disabled | `OnSurfaceLowBrush` | Disabled text, placeholder text |293294---295296## Part 4: Customization297298### Method 1: Override Color Palette (Full Cascade)299300Override `*Color` keys in a ResourceDictionary referenced by your theme. All ~288 brushes and controls update automatically.301302**Always provide both** `Light` and `Default` (Dark) theme values.303304### Method 2: Override Specific Brushes (Targeted)305306```xml307<SolidColorBrush x:Key="FilledButtonBackground" Color="#006D3B" />308```309310### Method 3: Override Per-Control Instance (Scoped)311312```xml313<Button Style="{StaticResource FilledButtonStyle}">314 <Button.Resources>315 <ResourceDictionary>316 <ResourceDictionary.ThemeDictionaries>317 <ResourceDictionary x:Key="Light">318 <SolidColorBrush x:Key="FilledButtonBackground" Color="#006D3B" />319 </ResourceDictionary>320 </ResourceDictionary.ThemeDictionaries>321 </ResourceDictionary>322 </Button.Resources>323</Button>324```325326### Customization Precedence (Highest to Lowest)3273281. **Control.Resources** -- per-instance3292. **Page.Resources** -- page-scoped3303. **App-level overrides** -- app-wide3314. **Theme defaults** -- active design-theme3325. **SharedColorPalette / SharedColors / SharedTypography** -- foundation333334---335336## Decision Guides337338### Which Color Role?339340| Scenario | Background | Foreground |341|----------|------------|------------|342| Primary CTA ("Submit") | `PrimaryBrush` | `OnPrimaryBrush` |343| Tonal action | `SecondaryContainerBrush` | `OnSecondaryContainerBrush` |344| Outlined button border | `OutlineBrush` | `PrimaryBrush` |345| Text-only action | Transparent | `PrimaryBrush` |346| Destructive ("Delete") | `ErrorBrush` | `OnErrorBrush` |347| Card / Dialog | `SurfaceBrush` | `OnSurfaceBrush` |348| Error banner | `ErrorContainerBrush` | `OnErrorContainerBrush` |349| Snackbar / Tooltip | `SurfaceInverseBrush` | `OnSurfaceInverseBrush` |350351### Which Button Style?352353| Scenario | Style Key |354|----------|-----------|355| Primary action | `FilledButtonStyle` |356| Secondary action | `FilledTonalButtonStyle` or `OutlinedButtonStyle` |357| Tertiary / low emphasis | `TextButtonStyle` |358| Icon-only action | `IconButtonStyle` |359360### XAML Best Practices361362- Always use `ThemeResource` (not `StaticResource`) for brushes so they respond to theme changes.363- Always use `StaticResource` for styles (styles don't change with theme).364- Use semantic keys, not theme-prefixed keys, for portable XAML.365366```xml367<!-- Correct -->368<Button Style="{StaticResource FilledButtonStyle}"369 Content="Save" />370371<!-- Avoid theme-prefixed keys in portable code -->372<!-- <Button Style="{StaticResource {ThemePrefix}FilledButtonStyle}" /> -->373```