Skip to content

Material You Mapping

The hypr desktop maps Gtheme’s 19-color palette to Material You (M3) design tokens. This provides a modern, cohesive design language across all themed applications while still using Gtheme’s standard color variables.

Color mapping

Gtheme variableM3 tokenUsage
backgroundsurface, surface_dimMain backgrounds
foregroundon_surfacePrimary text
blueprimaryPrimary accent, active elements
blue-hgon_primary_containerText on primary containers
cyansecondarySecondary accent
cyan-hgon_secondary_containerText on secondary containers
magentatertiaryTertiary accent
magenta-hgon_tertiary_containerText on tertiary containers
rederrorErrors, destructive actions
red-hgon_error_containerText on error containers
blacksurface_containerElevated surfaces (cards, panels)
black-hgsurface_container_highHigher elevation surfaces
whiteoutlineBorders, dividers
white-hgon_surface_variantSecondary text, icons
selection-backgroundinverse_surfaceInverted surface (snackbars, tooltips)
selection-foregroundinverse_on_surfaceText on inverted surfaces
greensurface_brightBrighter surface variant
green-hgsurface_dimDimmer surface variant
yellowprimary_containerTinted primary surfaces
yellow-hgon_primary_containerText on tinted surfaces

Pattern examples

The hypr desktop generates M3 color files in multiple formats. One pattern themes multiple applications through the same color system.

Hyprland variables

<[output-file]>=~/.config/hypr/colors/colors.conf
# Primary accent
$primary = rgba(<[blue]>ff)
$on_primary = rgba(<[background]>ff)
$primary_container = rgba(<[blue]>ff)
$on_primary_container = rgba(<[blue-hg]>ff)
# Secondary accent
$secondary = rgba(<[cyan]>ff)
$on_secondary = rgba(<[background]>ff)
# Surface / Background
$surface = rgba(<[background]>ff)
$surface_container = rgba(<[black]>ff)
$surface_container_high = rgba(<[black-hg]>ff)
$on_surface = rgba(<[foreground]>ff)
$on_surface_variant = rgba(<[white]>ff)
# Outline
$outline = rgba(<[white]>ff)

Hyprland configs reference these variables with $primary, $surface, etc.

CSS custom properties (Waybar)

<[output-file]>=~/.config/waybar/colors/colors.css
@define-color background #<[background]>;
@define-color on_background #<[foreground]>;
@define-color primary #<[blue]>;
@define-color secondary #<[cyan]>;
@define-color tertiary #<[magenta]>;
@define-color error #<[red]>;
@define-color surface #<[background]>;
@define-color surface_container #<[black]>;
@define-color on_surface #<[foreground]>;
@define-color outline #<[white]>;

Rofi theme

<[output-file]>=~/.config/rofi/colors.rasi
* {
primary: #<[blue]>;
secondary: #<[cyan]>;
tertiary: #<[magenta]>;
error: #<[red]>;
surface: #<[background]>;
on-surface: #<[foreground]>;
surface-container: #<[black]>;
outline: #<[white]>;
}

Design principles

The mapping follows these principles:

  1. ANSI colors as semantic roles — instead of using blue for “blue things”, blue is the primary accent. Cyan is secondary, magenta is tertiary.
  2. Black variants as elevationblack and black-hg represent elevated surfaces (cards, panels, popups) rather than literal black.
  3. White variants as secondary textwhite is outlines/borders, white-hg is secondary text.
  4. Consistent across all apps — the same color tokens are used in Hyprland, Waybar, Rofi, swaync, wlogout, and more.

This means switching themes produces a cohesive look across the entire desktop, not just matching terminal colors.