Skip to content
Magma Design System
Color
Name the role, not the color. A semantic role (--magma-*) says what an element is, a raised card, muted text, the primary action, and resolves to a color for the mode, the named theme and the contrast preference of the page. A palette step only flips with the mode: it stays grey under a tinted theme and gains no contrast when the user asks for more.
Two ways to write a role
Every role is a custom property holding rgb channels, and a Tailwind color.
.panel {
background: rgb(var(--magma-surface-raised));
color: rgb(var(--magma-text-default));
border: 1px solid rgb(var(--magma-border-muted));
}
<section class="bg-surface-raised text-fg-default border border-border-muted">
<p class="text-fg-muted">Secondary text</p>
</section>
In Tailwind the text roles are fg-*, so that no class reads text-text-*: --magma-text-muted is text-fg-muted. Every other role keeps its name. The roles come from styles/dist/css/semantic.css, their Tailwind colors from styles/dist/tailwind/theme.css; an opacity modifier works as usual (bg-surface-raised/80).
Neutral roles
The backgrounds, text and borders of everything that is neither an action nor a state. A named theme retints all of them at once.
Surfaces
Five levels, chosen by where the element sits, not by the shade: default is the page, sunken is recessed into it (wells, code blocks, tracks), muted groups on the page plane (zebra rows), raised is lifted off it (cards, panels, sticky bars), overlay floats above everything (modals, dropdowns, popovers). In light mode the levels above the page are close, so give raised and overlay a shadow too, as the components do. --magma-surface-sunkenbg-surface-sunken#e8e8e8alias of --surface-neutral-sunken#020202Below the page: wells, insets, code blocks, tracks.
--magma-surface-mutedbg-surface-muted#ebebebalias of --surface-neutral-muted#0d0d0dSame-plane grouping on the page: zebra rows, a subtle section.
--magma-surface-defaultbg-surface-default#f2f2f2alias of --surface-neutral-default#1d1d1dThe page canvas, the background of the body.
--magma-surface-raisedbg-surface-raised#f8f8f8alias of --surface-neutral-raised#303030Above the page: cards, panels, sticky headers.
--magma-surface-overlaybg-surface-overlay#ffffffalias of --surface-neutral-overlay#4a4a4aFloating above everything: modal, dropdown, popover, sheet.
--magma-surface-inversebg-surface-inverse#2a2a2aalias of --tone-neutral-02#f4f4f4A chip that flips with the mode: dark on a light page, light on a dark one.
--magma-surface-inverse-mutedbg-surface-inverse-muted#494949alias of --tone-neutral-03#e4e4e4The inverse chip, one step quieter.
Wash
A neutral pill, chip or hover, by how marked it is. wash-soft carries the whole text ladder, wash-base only text-default, wash-strong only icons. --magma-wash-softbg-wash-soft#edededalias of --tone-neutral-10#3e3e3eA neutral pill or chip, the least marked.
--magma-wash-basebg-wash-base#e1e1e1alias of --tone-neutral-09#535353A neutral pill or chip, at its default prominence.
--magma-wash-strongbg-wash-strong#d0d0d0alias of --tone-neutral-08#6b6b6bA neutral pill or chip, the most marked.
Text
text-muted is for secondary text that is still essential, text-subtle only for what the user can skip. Every text role is legible on all five surfaces in both modes. --magma-text-defaulttext-fg-default#050505alias of --text-neutral-default#fcfcfcBody text, titles and primary data.
--magma-text-mutedtext-fg-muted#494949alias of --text-neutral-muted#e4e4e4Secondary text that is still essential, such as an address or a phone number.
--magma-text-subtletext-fg-subtle#636363alias of --text-neutral-subtle#d3d3d3Non-essential text only: captions, units, hints.
--magma-text-disabledtext-fg-disabled#777777alias of --text-neutral-disabled#c4c4c4The labels of disabled controls.
--magma-text-on-emphasistext-fg-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on a solid fill.
Borders
border-muted is decorative (dividers, table grids), border-default outlines what works (inputs, cards), border-strong conveys a state, border-focus follows the accent. --magma-border-mutedborder-border-muted#dbdbdbalias of --border-neutral-muted#404040Decorative borders: dividers, the grid of a table.
--magma-border-defaultborder-border-default#c4c4c4alias of --border-neutral-default#6f6f6fFunctional outlines: inputs, cards.
--magma-border-strongborder-border-strong#8c8c8calias of --border-neutral-strong#abababA border that conveys a state, such as selected.
--magma-border-focusborder-border-focus#2467e7alias of --brand-maggioli-04#becadeFocus indication; follows the accent.
Other neutral roles
The inverse chip and its ink, the ink on the modal scrim, the selection, and the color of a projected shadow, to compose with your own geometry and alpha. --magma-neutral-emphasis and --magma-neutral-on-emphasis are deprecated aliases of --magma-surface-inverse and --magma-on-inverse. --magma-shadow-inkshadow-shadow-ink#050505alias of --tone-neutral-01#fcfcfcThe colour of a projected shadow, to compose with your own geometry and alpha.
--magma-neutral-fgtext-neutral-fg#494949alias of --tone-neutral-03#e4e4e4Neutral text and icons on a coloured context.
--magma-neutral-borderborder-neutral-border#a5a5a5alias of --tone-neutral-06#9a9a9aA neutral border on a coloured context.
--magma-neutral-emphasisbg-neutral-emphasis#2a2a2aalias of --tone-neutral-02#f4f4f4Deprecated: the inverse surface under its old name.
--magma-neutral-on-emphasistext-neutral-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dDeprecated: the ink on the inverse surface under its old name.
--magma-on-inversetext-on-inverse#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on either inverse surface.
--magma-on-backdrop - #fcfcfc -
--magma-selection-background - #b9e7fbalias of --label-sky-09#08597e
--magma-selection-color - #043044alias of --label-sky-01#e5f6fd
Accents
Two accents with the same nine roles: accent, the action color of the brand, and accent-ai, for features driven by AI. -fg is ink on a neutral surface, -on-emphasis is ink on the solid fill: swapping them is the quickest way to break contrast.
Accent
--magma-accent-surfacebg-accent-surface#dce0e7alias of --brand-maggioli-09#0446c3A background tinted with the brand accent: a selected row or chip.
--magma-accent-fgtext-accent-fg#074cccalias of --brand-maggioli-03#d5dae4Text or an icon in the brand accent on a neutral surface, such as a link.
--magma-accent-borderborder-accent-border#94acdaalias of --brand-maggioli-06#6e94dcA border tinted with the brand accent.
--magma-accent-emphasisbg-accent-emphasis#2467e7alias of --brand-maggioli-04#becadeThe solid fill of the brand accent: the primary action.
--magma-accent-emphasis-hoverbg-accent-emphasis-hover#074cccalias of --brand-maggioli-03#d5dae4The solid fill of the brand accent, hovered.
--magma-accent-emphasis-activebg-accent-emphasis-active#0039a3alias of --brand-maggioli-02#e4e6ebThe solid fill of the brand accent, pressed.
--magma-accent-surface-hoverbg-accent-surface-hover#ccd4e2alias of --brand-maggioli-08#1058e0A background tinted with the brand accent, hovered.
--magma-accent-surface-subtlebg-accent-surface-subtle#ecedf0alias of --brand-maggioli-10#003393A background tinted with the brand accent, lighter.
--magma-accent-on-emphasistext-accent-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on the solid fill of the brand accent.
AI accent
--magma-accent-ai-surfacebg-accent-ai-surface#e5dafdalias of --label-violet-09#500de8A background tinted with the AI accent: a selected row or chip.
--magma-accent-ai-fgtext-accent-ai-fg#5714f2alias of --label-violet-03#e0d3fdText or an icon in the AI accent on a neutral surface, such as a link.
--magma-accent-ai-borderborder-accent-ai-border#b89cfaalias of --label-violet-06#a47ef8A border tinted with the AI accent.
--magma-accent-ai-emphasisbg-accent-ai-emphasis#7e49f5alias of --label-violet-04#d2c0fcThe solid fill of the AI accent: the primary action.
--magma-accent-ai-emphasis-hoverbg-accent-ai-emphasis-hover#5714f2alias of --label-violet-03#e0d3fdThe solid fill of the AI accent, hovered.
--magma-accent-ai-emphasis-activebg-accent-ai-emphasis-active#410bbealias of --label-violet-02#ebe2fdThe solid fill of the AI accent, pressed.
--magma-accent-ai-surface-hoverbg-accent-ai-surface-hover#dbcdfcalias of --label-violet-08#6f35f4A background tinted with the AI accent, hovered.
--magma-accent-ai-surface-subtlebg-accent-ai-surface-subtle#f0eafealias of --label-violet-10#3b09abA background tinted with the AI accent, lighter.
--magma-accent-ai-on-emphasistext-accent-ai-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on the solid fill of the AI accent.
Status
Info, success, warning and danger publish the same vocabulary: washes with their text, borders, a solid fill with its ink, and three shortcuts at the default prominence (-surface, -fg, -border). The danger role uses the status-error palette. A named theme never retints a status; the contrast preference promotes its text.
Info
--magma-info-wash-softbg-info-wash-soft#dcf0faalias of --status-info-10#003f69The info background, the least marked.
--magma-info-wash-basebg-info-wash-base#c1e6f6alias of --status-info-09#005883The info background, at its default prominence.
--magma-info-wash-strongbg-info-wash-strong#a8dbf2alias of --status-info-08#006b97The info background, the most marked: icons only, no essential text.
--magma-info-text-defaulttext-info-fg-default#002d56alias of --text-info-default#e8f5fcInfo text on the info background.
--magma-info-text-mutedtext-info-fg-muted#004772alias of --text-info-muted#cfebf8Secondary info text on the info background.
--magma-info-text-subtletext-info-fg-subtle#005e89alias of --text-info-subtle#b4e0f4Non-essential info text on the info background.
--magma-info-text-disabledtext-info-fg-disabled#008ab8alias of --text-info-disabled#70c6eaDisabled info text on the info background.
--magma-info-border-mutedborder-info-border-muted#b8e2f5alias of --border-info-muted#004970The decorative info border.
--magma-info-border-defaultborder-info-border-default#8dcfebalias of --border-info-default#007ca8The functional info border.
--magma-info-border-strongborder-info-border-strong#129ac4alias of --border-info-strong#5eb8dcThe info border that conveys a state.
--magma-info-emphasisbg-info-emphasis#0077a4alias of --status-info-04#91d2efThe solid info fill: a solid badge, a button.
--magma-info-emphasis-hoverbg-info-emphasis-hover#005e89alias of --status-info-03#b4e0f4The solid info fill, hovered.
--magma-info-emphasis-activebg-info-emphasis-active#004772alias of --status-info-02#cfebf8The solid info fill, pressed.
--magma-info-on-emphasistext-info-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on the solid info fill.
--magma-info-surfacebg-info-surface#c1e6f6alias of --status-info-09#005883Shortcut for the info background at its default prominence (wash-base).
--magma-info-fgtext-info-fg#002d56alias of --text-info-default#e8f5fcShortcut for the default info text (text-default).
--magma-info-borderborder-info-border#8dcfebalias of --border-info-default#007ca8Shortcut for the functional info border (border-default).
Success
--magma-success-wash-softbg-success-wash-soft#dcf3e3alias of --status-success-10#004800The success background, the least marked.
--magma-success-wash-basebg-success-wash-base#bfe9cdalias of --status-success-09#00611bThe success background, at its default prominence.
--magma-success-wash-strongbg-success-wash-strong#a5e1baalias of --status-success-08#00742eThe success background, the most marked: icons only, no essential text.
--magma-success-text-defaulttext-success-fg-default#003500alias of --text-success-default#e7f7ecSuccess text on the success background.
--magma-success-text-mutedtext-success-fg-muted#005007alias of --text-success-muted#ceeed8Secondary success text on the success background.
--magma-success-text-subtletext-success-fg-subtle#006620alias of --text-success-subtle#b3e6c4Non-essential success text on the success background.
--magma-success-text-disabledtext-success-fg-disabled#00944calias of --text-success-disabled#6bce93Disabled success text on the success background.
--magma-success-border-mutedborder-success-border-muted#b9e8c9alias of --border-success-muted#005514The decorative success border.
--magma-success-border-defaultborder-success-border-default#8fd7a9alias of --border-success-default#008941The functional success border.
--magma-success-border-strongborder-success-border-strong#11a662alias of --border-success-strong#5fc388The success border that conveys a state.
--magma-success-emphasisbg-success-emphasis#008039alias of --status-success-04#8fd9aaThe solid success fill: a solid badge, a button.
--magma-success-emphasis-hoverbg-success-emphasis-hover#006620alias of --status-success-03#b3e6c4The solid success fill, hovered.
--magma-success-emphasis-activebg-success-emphasis-active#005007alias of --status-success-02#ceeed8The solid success fill, pressed.
--magma-success-on-emphasistext-success-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on the solid success fill.
--magma-success-surfacebg-success-surface#bfe9cdalias of --status-success-09#00611bShortcut for the success background at its default prominence (wash-base).
--magma-success-fgtext-success-fg#003500alias of --text-success-default#e7f7ecShortcut for the default success text (text-default).
--magma-success-borderborder-success-border#8fd7a9alias of --border-success-default#008941Shortcut for the functional success border (border-default).
Warning
--magma-warning-wash-softbg-warning-wash-soft#ffedb5alias of --status-warning-10#4f3b00The warning background, the least marked.
--magma-warning-wash-basebg-warning-wash-base#ffdc75alias of --status-warning-09#6b5000The warning background, at its default prominence.
--magma-warning-wash-strongbg-warning-wash-strong#ffcd39alias of --status-warning-08#816000The warning background, the most marked: icons only, no essential text.
--magma-warning-text-defaulttext-warning-fg-default#3a2c00alias of --text-warning-default#fff2cdWarning text on the warning background.
--magma-warning-text-mutedtext-warning-fg-muted#584200alias of --text-warning-muted#ffe595Secondary warning text on the warning background.
--magma-warning-text-subtletext-warning-fg-subtle#715500alias of --text-warning-subtle#ffd559Non-essential warning text on the warning background.
--magma-warning-text-disabledtext-warning-fg-disabled#a47b00alias of --text-warning-disabled#edb100Disabled warning text on the warning background.
--magma-warning-border-mutedborder-warning-border-muted#efd8a8alias of --border-warning-muted#653100The decorative warning border.
--magma-warning-border-defaultborder-warning-border-default#e2bf75alias of --border-warning-default#9b6200The functional warning border.
--magma-warning-border-strongborder-warning-border-strong#b88200alias of --border-warning-strong#d1a337The warning border that conveys a state.
--magma-warning-emphasisbg-warning-emphasis#8e6a00alias of --status-warning-04#febe00The solid warning fill: a solid badge, a button.
--magma-warning-emphasis-hoverbg-warning-emphasis-hover#715500alias of --status-warning-03#ffd559The solid warning fill, hovered.
--magma-warning-emphasis-activebg-warning-emphasis-active#584200alias of --status-warning-02#ffe595The solid warning fill, pressed.
--magma-warning-on-emphasistext-warning-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on the solid warning fill.
--magma-warning-surfacebg-warning-surface#ffdc75alias of --status-warning-09#6b5000Shortcut for the warning background at its default prominence (wash-base).
--magma-warning-fgtext-warning-fg#3a2c00alias of --text-warning-default#fff2cdShortcut for the default warning text (text-default).
--magma-warning-borderborder-warning-border#e2bf75alias of --border-warning-default#9b6200Shortcut for the functional warning border (border-default).
Danger
--magma-danger-wash-softbg-danger-wash-soft#ffe8e6alias of --status-error-10#770000The danger background, the least marked.
--magma-danger-wash-basebg-danger-wash-base#ffd6d3alias of --status-error-09#9e1823The danger background, at its default prominence.
--magma-danger-wash-strongbg-danger-wash-strong#fec6c2alias of --status-error-08#b63236The danger background, the most marked: icons only, no essential text.
--magma-danger-text-defaulttext-danger-fg-default#590000alias of --text-error-default#ffefeeDanger text on the danger background.
--magma-danger-text-mutedtext-danger-fg-muted#84000balias of --text-error-muted#ffdfddSecondary danger text on the danger background.
--magma-danger-text-subtletext-danger-fg-subtle#a52128alias of --text-error-subtle#ffcecaNon-essential danger text on the danger background.
--magma-danger-text-disabledtext-danger-fg-disabled#d95352alias of --text-error-disabled#faa5a0Disabled danger text on the danger background.
--magma-danger-border-mutedborder-danger-border-muted#ffcbc6alias of --border-error-muted#7e000fThe decorative danger border.
--magma-danger-border-defaultborder-danger-border-default#feaba5alias of --border-error-default#bc3a3cThe functional danger border.
--magma-danger-border-strongborder-danger-border-strong#da605dalias of --border-error-strong#f18883The danger border that conveys a state.
--magma-danger-emphasisbg-danger-emphasis#c44041alias of --status-error-04#fdb8b2The solid danger fill: a solid badge, a button.
--magma-danger-emphasis-hoverbg-danger-emphasis-hover#a52128alias of --status-error-03#ffcecaThe solid danger fill, hovered.
--magma-danger-emphasis-activebg-danger-emphasis-active#84000balias of --status-error-02#ffdfddThe solid danger fill, pressed.
--magma-danger-on-emphasistext-danger-on-emphasis#ffffffalias of --tone-neutral-seed#1d1d1dText and icons on the solid danger fill.
--magma-danger-surfacebg-danger-surface#ffd6d3alias of --status-error-09#9e1823Shortcut for the danger background at its default prominence (wash-base).
--magma-danger-fgtext-danger-fg#590000alias of --text-error-default#ffefeeShortcut for the default danger text (text-default).
--magma-danger-borderborder-danger-border#feaba5alias of --border-error-default#bc3a3cShortcut for the functional danger border (border-default).
Pairing rules
-fg on a neutral surface, -on-emphasis on the fill.Text on a wash is bounded: wash-soft takes the whole text ladder, wash-base only text-default, wash-strong icons only. The same holds for every status.Hierarchy without losing contrast: use weight, size and spacing, and soften the chrome (border-muted, zebra on surface-muted) rather than the text.Elevation is a role: page surface-default, card surface-raised, floating layer surface-overlay, well surface-sunken. A grey that has to look marked in both modes is a wash, not a surface. These are the pairs Magma measures for contrast; any other combination is not measured.
Palettes
The primitives the roles point at, from 01 to 10. Paint with them only when the color is data: a category, a tag, a color the user picked (label-*), a brand (brand-*). The strips follow the mode of this page; a click on a swatch copies its custom property.
Tones
The neutral families. neutral is the grey of the default theme; porcelain and bisque back the cool and warm themes: switch those on with data-theme-name, do not paint with them by hand. seed is the paper of the mode, white in light and black in dark.
porcelain
01020304050607080910seed
kaolin
01020304050607080910seed
neutral
01020304050607080910seed
fireclay
01020304050607080910seed
bisque
01020304050607080910seed
Status colors
--status-info#23b2e1
base01020304050607080910
--status-success#21bf73
base01020304050607080910
--status-error#ed6663
base01020304050607080910
--status-warning#ffc107
base01020304050607080910
Labels
--label-red#d01b1b
base01020304050607080910
--label-amaranth#f43f5e
base01020304050607080910
--label-orchid#ec4899
base01020304050607080910
--label-purple#a855f7
base01020304050607080910
--label-violet#8b5cf6
base01020304050607080910
--label-blue#0e36f6
base01020304050607080910
--label-sky#0ea5e9
base01020304050607080910
--label-aqua#06b6d4
base01020304050607080910
--label-green#22c55e
base01020304050607080910
--label-lime#84cc16
base01020304050607080910
--label-yellow#eab308
base01020304050607080910
--label-orange#f97316
base01020304050607080910
Brands
--brand-maggioli#00379e
base01020304050607080910
--brand-maggioli-editore#0f4ad5
base01020304050607080910
--brand-rnd#cba26b
base01020304050607080910
Variants
Aliases of the families they name, kept for the variant prop of the components. They have no role of their own: the accents are accent and accent-ai.
--variant-primaryalias of --brand-maggioli
base01020304050607080910
--variant-secondaryalias of --brand-maggioli-editore
base01020304050607080910
--variant-aialias of --label-violet
base01020304050607080910
Role primitives
The steps behind the neutral and status roles, one set per family. They follow the mode but not the named theme nor the contrast preference: paint with the --magma-* roles. --surface-<family>-sunken--surface-<family>-muted--surface-<family>-default--surface-<family>-raised--surface-<family>-overlay--border-<family>-muted--border-<family>-default--border-<family>-strong--text-<family>-default--text-<family>-muted--text-<family>-subtle--text-<family>-disabled
Modified 6 days agoVittorio VittoriDesign System Architect
Created 6 days agoVittorio VittoriDesign System Architect