Skip to content
Halorav0.1.0

Foundations

Tokens

Semantic names, one source of truth. Every value below is read from the live CSS custom properties.

How tokens work#

Tokens are CSS custom properties prefixed --ha-. Structure tokens (type, space, radius, motion, z-index, breakpoints, containers) are the same for every brand. Color tokens come in a set per brand and theme. The same values are in tokens.json and typed in tokens.d.ts.

CSS
.card {
  background: var(--ha-surface);
  color: var(--ha-text);
  border-radius: var(--ha-radius-card);
  box-shadow: var(--ha-shadow-raised);
  transition: translate var(--ha-dur-slow) var(--ha-ease);
}

Color#

Each panel is a live scope with its own theme and brand. The ratios are computed in your browser from the resolved values, using the same function the test suite uses. A ratio judges a token against the page canvas, or for on-accent, against the fill.

Origin brand#

Origin, light

Surfaces
--ha-canvas#fafaf9
--ha-surface#ffffff
--ha-surface-2#f5f3f1
--ha-raised#ffffff
--ha-raised-hover#faf7f4
--ha-glass#ffffff
--ha-sunkenrgba(12, 10, 9, 0.05)
--ha-header-glassrgba(255, 255, 255, 0.94)
Lines
--ha-border#e2ded9
--ha-border-strong#cfc9c2
--ha-edge#cfc9c2
--ha-glass-edgergba(10, 10, 10, 0.08)
Text
--ha-text#0c0a0918.92:1
--ha-text-strong#0c0a0918.92:1
--ha-muted#44403c9.84:1
--ha-faint#57534e7.30:1
Accent
--ha-accent-fill#c2410cFills with on-accent content
--ha-accent-fill-hover#9a3412
--ha-on-accent#ffffffContent on accent-fill5.18:1
--ha-accent-text#c2410c4.96:1
--ha-accent#ff4d00Decoration only
--ha-accent-hover#e64500Decoration only
--ha-accent-light#ff8c42Decoration only
--ha-accent-ink#0a0a0aLegacy: text on the saturated accent
Signals and ambient
--ha-danger#b91c1c6.19:1
--ha-success#15803d4.80:1
--ha-focus-ring#c2410c4.96:1
--ha-ember#ffe4d6
--ha-glow#8b5cf6
--ha-teal#14b8a6

Origin, dark

Surfaces
--ha-canvas#0a0a0a
--ha-surface#111111
--ha-surface-2#161210
--ha-raisedrgba(255, 255, 255, 0.07)
--ha-raised-hoverrgba(255, 255, 255, 0.12)
--ha-glassrgba(255, 255, 255, 0.045)
--ha-sunkenrgba(0, 0, 0, 0.35)
--ha-header-glassrgba(17, 17, 17, 0.85)
Lines
--ha-border#262626
--ha-border-strong#333338
--ha-edgergba(255, 255, 255, 0.12)
--ha-glass-edgergba(255, 255, 255, 0.08)
Text
--ha-text#fafafa18.97:1
--ha-text-strong#fafafa18.97:1
--ha-muted#b8b8b89.98:1
--ha-faint#9a9a9a7.04:1
Accent
--ha-accent-fill#c2410cFills with on-accent content
--ha-accent-fill-hover#9a3412
--ha-on-accent#ffffffContent on accent-fill5.18:1
--ha-accent-text#ff8c428.56:1
--ha-accent#ff4d00Decoration only
--ha-accent-hover#ff6a26Decoration only
--ha-accent-light#ff8c42Decoration only
--ha-accent-ink#0a0a0aLegacy: text on the saturated accent
Signals and ambient
--ha-danger#f871717.16:1
--ha-success#4ade8011.36:1
--ha-focus-ring#ff8c428.56:1
--ha-ember#3b0a02
--ha-glow#8b5cf6
--ha-teal#14b8a6

Gabarito brand#

Gabarito, light

Surfaces
--ha-canvas#f4f6f1
--ha-surfacergba(255, 255, 255, 0.66)
--ha-surface-2#ebeee6
--ha-raisedrgba(255, 255, 255, 0.78)
--ha-raised-hover#ffffff
--ha-glassrgba(255, 255, 255, 0.72)
--ha-sunkenrgba(21, 26, 18, 0.06)
--ha-header-glassrgba(255, 255, 255, 0.72)
Lines
--ha-borderrgba(21, 26, 18, 0.1)
--ha-border-strongrgba(21, 26, 18, 0.2)
--ha-edgergba(21, 26, 18, 0.2)
--ha-glass-edgergba(21, 26, 18, 0.07)
Text
--ha-text#1b1f1715.38:1
--ha-text-strong#0a0d0817.97:1
--ha-muted#484e427.90:1
--ha-faint#5f655a5.52:1
Accent
--ha-accent-fill#a8e05fFills with on-accent content
--ha-accent-fill-hover#98d24a
--ha-on-accent#101508Content on accent-fill11.91:1
--ha-accent-text#3a63106.49:1
--ha-accent#a8e05fDecoration only
--ha-accent-hover#98d24aDecoration only
--ha-accent-light#b9ea79Decoration only
--ha-accent-ink#101508Legacy: text on the saturated accent
Signals and ambient
--ha-danger#b3232b6.05:1
--ha-success#3a63106.49:1
--ha-focus-ring#4f84164.16:1
--ha-ember#e6f3cd
--ha-glow#7a68ee
--ha-teal#14b8a6

Gabarito, dark

Surfaces
--ha-canvas#060608
--ha-surfacergba(20, 20, 24, 0.42)
--ha-surface-2#101014
--ha-raisedrgba(255, 255, 255, 0.06)
--ha-raised-hoverrgba(255, 255, 255, 0.1)
--ha-glassrgba(255, 255, 255, 0.07)
--ha-sunkenrgba(0, 0, 0, 0.24)
--ha-header-glassrgba(18, 18, 22, 0.78)
Lines
--ha-borderrgba(255, 255, 255, 0.08)
--ha-border-strongrgba(255, 255, 255, 0.15)
--ha-edgergba(255, 255, 255, 0.15)
--ha-glass-edgergba(255, 255, 255, 0.08)
Text
--ha-text#ececf117.19:1
--ha-text-strong#ffffff20.24:1
--ha-muted#9d9daa7.56:1
--ha-faint#8a8a985.95:1
Accent
--ha-accent-fill#a8e05fFills with on-accent content
--ha-accent-fill-hover#b9ea79
--ha-on-accent#101508Content on accent-fill11.91:1
--ha-accent-text#a8e05f13.01:1
--ha-accent#a8e05fDecoration only
--ha-accent-hover#b9ea79Decoration only
--ha-accent-light#b9ea79Decoration only
--ha-accent-ink#101508Legacy: text on the saturated accent
Signals and ambient
--ha-danger#ffa1a410.49:1
--ha-success#a8e05f13.01:1
--ha-focus-ring#a8e05f13.01:1
--ha-ember#171d10
--ha-glow#8b7cf6
--ha-teal#14b8a6

Typography#

Fonts are --ha-font-sans, --ha-font-mono, and --ha-font-display. The scale uses clamp(), so sizes step down on phones. Body copy is 16px, labels are 13px or more at weight 500, and the display and headings use weight 500 with negative tracking.

--ha-text-display: clamp(2.75rem, 9.5vw, 5.75rem) / 0.98 / -0.04emDisplay: Light, glass, motion
--ha-text-h1: clamp(2.25rem, 6vw, 3.75rem) / 1.04 / -0.03emHeading 1: Light, glass, motion
--ha-text-h2: clamp(1.75rem, 4vw, 2.5rem) / 1.1 / -0.03emHeading 2: Light, glass, motion
--ha-text-h3: 1.25rem / 1.25 / -0.02emHeading 3: Light, glass, motion
--ha-text-lede: clamp(1.125rem, 1.6vw, 1.25rem) / 1.6Lede: Light, glass, motion
--ha-text-body: 1rem / 1.6Body: Light, glass, motion
--ha-text-small: 0.9375rem / 1.5Small: Light, glass, motion
--ha-text-caption: 0.8125rem / 1.4Caption: Light, glass, motion
TokenValue
font-weight-regular400
font-weight-medium500
font-weight-semibold600
leading-prose1.7
tracking-label0.12em
tracking-mono0.04em

Spacing#

space-10.25rem
space-20.5rem
space-30.75rem
space-41rem
space-51.5rem
space-62rem
space-73rem
space-84rem
space-96rem
space-108rem
TokenValueUse
space-1 to space-100.25rem to 8remGaps and padding
gutter24pxPage side padding
sectionclamp(112px, 14vw, 160px)Gap between landing sections
section-tightclamp(56px, 8vw, 88px)Footer margin, compact pages

Radius#

sm
8px
md
12px
lg
18px
card
24px
pill
999px

Shadows#

Shadows change with the theme and brand. Dark glass uses an inset highlight and a one pixel ring. Light surfaces are solid with a visible edge and a soft drop.

shadow-glass
shadow-raised
shadow-accent
shadow-overlay

Motion#

Hover or focus a track to see the curve. All durations collapse to near zero under reduced motion or the pause switch.

--ha-ease: cubic-bezier(0.32, 0.72, 0, 1)

--ha-spring: cubic-bezier(0.34, 1.56, 0.64, 1)

TokenValueUse
dur-fast140msColor and background changes
dur-base300msSmall layout moves
dur-slow500msHeader pill, hover lift, layout
dur-reveal700msScroll reveal
reveal-distance24pxReveal translate, 24px or less
stagger-max240msLongest reveal stagger

Z-index#

TokenValueLayer
z-lights-1Page lights and particles
z-base0Content
z-sticky20Sticky elements
z-header50Header
z-drawer60Mobile navigation drawer
z-dialog100Dialogs
z-toast200Toasts
z-skip300Skip link

Breakpoints and containers#

Custom properties cannot be used inside media queries, so the breakpoints are documented values. Tailwind users get them as ha-sm to ha-xl screens.

TokenValueUsed for
bp-sm480pxButton groups stack below this
bp-md640pxHeader and dialog go to the phone layout
bp-lg900pxHeader navigation appears
bp-xl1120pxPage container width
container1120pxPage container
container-narrow720pxNarrow column
container-prose68chArticle measure
container-pill720pxScrolled header pill width
header-height72pxHeader bar
header-height-mobile64pxHeader bar on phones (64px maximum)
tap-target44pxMinimum touch target on phones

Edit this page on GitHub

Type to search.