Browse Foundations

Foundations

Semantic colour

How SGDS semantic colour tokens work, how they map from primitive colours, and when to use them across backgrounds, surfaces, text, borders, and forms.

How semantic colour tokens work

A primitive colour token names a hex value. A semantic colour token names the job that value performs in the interface. Where sgds-blue-600 names a specific shade, a semantic token like sgds-link-color-default names the role "default colour for a link". The system maps each role to the right primitive behind the scenes.

Raw hex valuePrimitive colourSemantic colourDay theme#0269D0sgds-blue-600sgds-link-color-defaultNight theme#60AAF4sgds-blue-400

sgds-link-color-default resolves to two primitives, one for each theme. Switching themes swaps the underlying primitive while every component using the link role stays unchanged.

This separation lets themes and brands shift colours without touching components. The same semantic token can point to one primitive in day mode and a different one in night mode. The role stays consistent across every component. Only the rendered hex value changes for contrast, brand, or accessibility.

Night theme token output
Day theme token output

This mapping gives SGDS one place to adjust colour behaviour across components, instead of changing each component separately.

How we structure semantic colours

SGDS semantic colour names follow a role-based structure. The name tells you what the colour is for before it tells you the visual value.

Basesgds-primary-bg-mutedModifier
  • Base design element or property combines the colour role and where it is applied, such as danger surface, success text, primary border, or neutral icon.
  • Modifier identifies emphasis or state, such as default, subtle, muted, inverse, fixed light, fixed dark, hover, or selected.

When we use semantic colours

SGDS uses semantic colours wherever a colour decision needs to stay meaningful across components, themes, and product brands. They let us describe the job a colour performs once, then remap the primitive values behind that job as the system grows.

  • Component foundations use background, surface, foreground, and border tokens so every component responds to day mode, night mode, and brand changes consistently.
  • Interaction states use semantic tokens for hover, active, selected, disabled, and inverse states, so state behaviour stays predictable across patterns.
  • Status and feedback use success, danger, warning, and neutral tokens, so alerts, validation, badges, and messages share the same meaning.
  • Forms use form-specific semantic tokens for fields, labels, helper text, and validation states, so form controls stay aligned with SGDS components.
  • System scaling relies on semantic colours because new themes, brands, and components can reuse the same roles instead of redefining colour values one component at a time.

Background colour tokens

Background tokens set the base canvas colour for pages, panels, and overlays. They adapt between light and dark themes.

Default

TokenDescriptionLightDarksgds-bg-defaultPrimary background colour for pages and major sections. Used as the standard backdrop across interfaces.
gray-000
gray-1100
sgds-bg-alternateAlternate background for visual separation between sections, e.g. zebra striping or secondary panels.
gray-50
gray-1000
sgds-bg-fixed-lightFixed light background that does not change in dark mode. Useful for areas that must always remain light.
gray-000
gray-000
sgds-bg-fixed-darkFixed dark background that stays dark regardless of theme. Ideal for overlays or consistent dark regions.
gray-1100
gray-1100
sgds-bg-overlaySemi-opaque background used behind modals, drawers, and overlays to obscure background content.
gray-1100 · 50%
gray-1100 · 50%
sgds-bg-translucent10% translucent overlay. Adapts between dark-on-light and light-on-dark depending on the active theme.
gray-1100 · 10%
gray-000 · 10%
sgds-bg-translucent-subtleSubtle ~5% translucent background. Used for lighter layering needs such as hover states.
gray-1100 · 5%
gray-000 · 10%
sgds-bg-transparentFully transparent background. Used when no background colour is required, or to inherit from the parent.
transparent
transparent

Primary

TokenDescriptionLightDarksgds-primary-bg-defaultBold primary background for call-to-action elements.
product-primary-700
product-primary-600
sgds-primary-bg-mutedSubtle primary tinted background for low-emphasis areas.
product-primary-100
product-primary-200
sgds-primary-bg-translucentTranslucent primary background for hover or focus states.
product-primary-700 · 10%
product-primary-100 · 5%

Success

TokenDescriptionLightDarksgds-success-bg-defaultDefault success background for confirmation and success states.
green-700
green-600
sgds-success-bg-mutedSubtle success tinted background.
green-100
green-200

Warning

TokenDescriptionLightDarksgds-warning-bg-defaultDefault warning background for caution or alert states.
yellow-200
yellow-300
sgds-warning-bg-mutedSubtle warning tinted background.
yellow-100
yellow-200

Danger

TokenDescriptionLightDarksgds-danger-bg-defaultDefault danger background for error and destructive states.
red-700
red-600
sgds-danger-bg-mutedSubtle danger tinted background.
red-100
red-200

Accent

TokenDescriptionLightDarksgds-accent-bg-defaultDefault accent background (blue) for informational and link-adjacent elements.
blue-700
blue-600
sgds-accent-bg-mutedSubtle accent tinted background.
blue-100
blue-200

Neutral

TokenDescriptionLightDarksgds-neutral-bg-defaultDefault neutral background for secondary or contextual elements.
gray-700
gray-600
sgds-neutral-bg-mutedSubtle neutral tinted background.
gray-100
gray-200

Purple

TokenDescriptionLightDarksgds-purple-bg-defaultDefault purple background for brand-purple accented elements.
purple-700
purple-600
sgds-purple-bg-mutedSubtle purple tinted background.
purple-100
purple-200

Cyan

TokenDescriptionLightDarksgds-cyan-bg-defaultDefault cyan background for GovTech-cyan accented elements.
cyan-700
cyan-600
sgds-cyan-bg-mutedSubtle cyan tinted background.
cyan-100
cyan-200

Foreground colour tokens

Foreground colour tokens for icons and UI elements across semantic categories. Each token resolves to a different primitive value in light and dark modes.

Default

TokenDescriptionLightDarksgds-color-defaultPrimary foreground colour for general body text and icons.
gray-1000
gray-100
sgds-color-subtleSlightly muted foreground for secondary or supporting text.
gray-700
gray-400
sgds-color-mutedMuted foreground for disabled, placeholder, or low-emphasis content.
gray-300
gray-800
sgds-color-inverseInverse foreground colour for use on contrasting backgrounds.
gray-100
gray-1000
sgds-color-fixed-lightFixed light foreground that does not change across themes.
gray-100
gray-100
sgds-color-fixed-darkFixed dark foreground that does not change across themes.
gray-1000
gray-1000
sgds-color-transparentTransparent foreground colour.
transparent
transparent

Primary

TokenDescriptionLightDarksgds-primary-color-defaultPrimary text or icon colour on neutral backgrounds.
product-primary-600
product-primary-400
sgds-primary-color-emphasisStronger primary colour for links and emphasis text.
product-primary-700
product-primary-300
sgds-primary-color-fixed-lightFixed primary colour for use on dark or coloured backgrounds.
product-primary-400
product-primary-400
sgds-primary-color-fixed-darkFixed primary colour for use on light backgrounds.
product-primary-600
product-primary-600

Success

TokenDescriptionLightDarksgds-success-color-defaultSuccess text or icon colour.
green-600
green-400
sgds-success-color-emphasisStronger success colour for emphasis.
green-700
green-300
sgds-success-color-fixed-lightFixed success colour for dark backgrounds.
green-400
green-400
sgds-success-color-fixed-darkFixed success colour for light backgrounds.
green-600
green-600

Warning

TokenDescriptionLightDarksgds-warning-color-defaultWarning text or icon colour.
yellow-600
yellow-300
sgds-warning-color-emphasisStronger warning colour for emphasis.
yellow-700
yellow-200
sgds-warning-color-fixed-lightFixed warning colour for dark backgrounds.
yellow-300
yellow-300
sgds-warning-color-fixed-darkFixed warning colour for light backgrounds.
yellow-600
yellow-600

Danger

TokenDescriptionLightDarksgds-danger-color-defaultDanger text or icon colour.
red-600
red-400
sgds-danger-color-emphasisStronger danger colour for emphasis.
red-700
red-300
sgds-danger-color-fixed-lightFixed danger colour for dark backgrounds.
red-400
red-400
sgds-danger-color-fixed-darkFixed danger colour for light backgrounds.
red-600
red-600

Accent

TokenDescriptionLightDarksgds-accent-color-defaultAccent text or icon colour.
blue-600
blue-400
sgds-accent-color-emphasisStronger accent colour for emphasis.
blue-700
blue-300
sgds-accent-color-fixed-lightFixed accent colour for dark backgrounds.
blue-400
blue-400
sgds-accent-color-fixed-darkFixed accent colour for light backgrounds.
blue-600
blue-600

Neutral

TokenDescriptionLightDarksgds-neutral-color-defaultNeutral text or icon colour.
gray-600
gray-400
sgds-neutral-color-emphasisStronger neutral colour for emphasis.
gray-700
gray-300
sgds-neutral-color-fixed-lightFixed neutral colour for dark backgrounds.
gray-400
gray-400
sgds-neutral-color-fixed-darkFixed neutral colour for light backgrounds.
gray-600
gray-600

Purple

TokenDescriptionLightDarksgds-purple-color-defaultPurple text or icon colour.
purple-600
purple-400
sgds-purple-color-emphasisStronger purple colour for emphasis.
purple-700
purple-300
sgds-purple-color-fixed-lightFixed purple colour for dark backgrounds.
purple-400
purple-400
sgds-purple-color-fixed-darkFixed purple colour for light backgrounds.
purple-600
purple-600

Cyan

TokenDescriptionLightDarksgds-cyan-color-defaultCyan text or icon colour.
cyan-600
cyan-400
sgds-cyan-color-emphasisStronger cyan colour for emphasis.
cyan-700
cyan-300
sgds-cyan-color-fixed-lightFixed cyan colour for dark backgrounds.
cyan-400
cyan-400
sgds-cyan-color-fixed-darkFixed cyan colour for light backgrounds.
cyan-600
cyan-600

Surface colour tokens

Surface tokens define fill colours for elevated containers such as cards, drawers, and dropdowns. They adapt between light and dark themes.

Default

TokenDescriptionLightDarksgds-surface-defaultDefault surface colour for containers such as cards, modals, and drawers. Adapts to light or dark themes.
gray-000
gray-900
sgds-surface-raisedSlightly elevated surface indicating layering above the default surface.
gray-100
gray-800
sgds-surface-inverseInverse of the default surface. Used for high-contrast regions that flip between themes.
gray-900
gray-000
sgds-surface-fixed-lightSurface that always appears light, regardless of theme. For consistent brand regions.
gray-000
gray-000
sgds-surface-fixed-darkSurface that always appears dark, regardless of theme.
gray-900
gray-900

Primary

TokenDescriptionLightDarksgds-primary-surface-defaultDefault primary surface for filled interactive elements.
product-primary-600
product-primary-600
sgds-primary-surface-emphasisStronger primary surface for hover or active states.
product-primary-700
product-primary-700
sgds-primary-surface-mutedLight primary surface for tinted badges and backgrounds.
product-primary-100
product-primary-100
sgds-primary-surface-translucentTranslucent primary surface for layered UI elements.
product-primary-700 · 10%
product-primary-100 · 10%

Success

TokenDescriptionLightDarksgds-success-surface-defaultDefault success surface for filled components.
green-600
green-600
sgds-success-surface-emphasisStronger success surface for hover or active states.
green-700
green-700
sgds-success-surface-mutedLight success surface for tinted badges and backgrounds.
green-100
green-100

Warning

TokenDescriptionLightDarksgds-warning-surface-defaultDefault warning surface for filled components.
yellow-200
yellow-200
sgds-warning-surface-emphasisStronger warning surface for hover or active states.
yellow-600
yellow-600
sgds-warning-surface-mutedLight warning surface for tinted badges.
yellow-100
yellow-100

Danger

TokenDescriptionLightDarksgds-danger-surface-defaultDefault danger surface for filled components.
red-600
red-600
sgds-danger-surface-emphasisStronger danger surface for hover or active states.
red-700
red-700
sgds-danger-surface-mutedLight danger surface for tinted badges.
red-100
red-100
sgds-danger-surface-translucentTranslucent danger surface for destructive state overlays.
red-700 · 8%
red-100 · 8%

Accent

TokenDescriptionLightDarksgds-accent-surface-defaultDefault accent surface for filled components.
blue-600
blue-600
sgds-accent-surface-emphasisStronger accent surface for hover or active states.
blue-700
blue-700
sgds-accent-surface-mutedLight accent surface for tinted badges.
blue-100
blue-100

Neutral

TokenDescriptionLightDarksgds-neutral-surface-defaultDefault neutral surface for filled components.
gray-700
gray-600
sgds-neutral-surface-emphasisStronger neutral surface for hover or active states.
gray-800
gray-700
sgds-neutral-surface-mutedLight neutral surface for tinted badges.
gray-100
gray-200
sgds-neutral-surface-translucentTranslucent neutral surface for layered neutral UI.
gray-1100 · 15%
gray-000 · 15%

Purple

TokenDescriptionLightDarksgds-purple-surface-defaultDefault purple surface for filled components.
purple-600
purple-600
sgds-purple-surface-emphasisStronger purple surface for hover or active states.
purple-700
purple-700
sgds-purple-surface-mutedLight purple surface for tinted badges.
purple-100
purple-100

Cyan

TokenDescriptionLightDarksgds-cyan-surface-defaultDefault cyan surface for filled components.
cyan-600
cyan-600
sgds-cyan-surface-emphasisStronger cyan surface for hover or active states.
cyan-700
cyan-700
sgds-cyan-surface-mutedLight cyan surface for tinted badges.
cyan-100
cyan-100

Border colour tokens

Border colour tokens define outline and divider colours for components across semantic categories. They adapt between light and dark themes.

Default

TokenDescriptionLightDarksgds-border-color-defaultDefault border colour for interactive components and dividers.
gray-500
gray-500
sgds-border-color-emphasisStronger border colour for emphasis, focus, or active states.
gray-800
gray-200
sgds-border-color-mutedSubtle border colour for lightweight separators and containers.
gray-200
gray-800
sgds-border-color-fixed-lightFixed light border colour that stays light in both themes.
gray-000
gray-000
sgds-border-color-fixed-darkFixed dark border colour that stays dark in both themes.
gray-1000
gray-1000
sgds-border-color-translucentTranslucent border for subtle outlines that adapt to the active theme.
gray-1100 · 5%
gray-000 · 10%
sgds-border-color-transparentTransparent border that removes the border visually.
transparent
transparent

Primary

TokenDescriptionLightDarksgds-primary-border-color-defaultDefault primary border colour.
product-primary-600
product-primary-400
sgds-primary-border-color-emphasisStronger primary border for focus or active states.
product-primary-700
product-primary-200
sgds-primary-border-color-mutedSubtle primary border for lightweight outlines.
product-primary-200
product-primary-700

Success

TokenDescriptionLightDarksgds-success-border-color-defaultDefault success border colour.
green-600
green-400
sgds-success-border-color-emphasisStronger success border for focus or active states.
green-700
green-200
sgds-success-border-color-mutedSubtle success border colour.
green-200
green-700

Warning

TokenDescriptionLightDarksgds-warning-border-color-defaultDefault warning border colour.
yellow-600
yellow-400
sgds-warning-border-color-emphasisStronger warning border for focus or active states.
yellow-700
yellow-200
sgds-warning-border-color-mutedSubtle warning border colour.
yellow-200
yellow-700

Danger

TokenDescriptionLightDarksgds-danger-border-color-defaultDefault danger border colour.
red-600
red-400
sgds-danger-border-color-emphasisStronger danger border for focus or active states.
red-700
red-200
sgds-danger-border-color-mutedSubtle danger border colour.
red-200
red-700

Accent

TokenDescriptionLightDarksgds-accent-border-color-defaultDefault accent border colour.
blue-500
blue-500
sgds-accent-border-color-emphasisStronger accent border for focus or active states.
blue-700
blue-200
sgds-accent-border-color-mutedSubtle accent border colour.
blue-200
blue-700

Neutral

TokenDescriptionLightDarksgds-neutral-border-color-defaultDefault neutral border colour.
gray-600
gray-400
sgds-neutral-border-color-emphasisStronger neutral border for emphasis.
gray-700
gray-200
sgds-neutral-border-color-mutedSubtle neutral border colour.
gray-200
gray-700

Purple

TokenDescriptionLightDarksgds-purple-border-color-defaultDefault purple border colour.
purple-500
purple-500
sgds-purple-border-color-emphasisStronger purple border for focus or active states.
purple-700
purple-200
sgds-purple-border-color-mutedSubtle purple border colour.
purple-200
purple-700

Cyan

TokenDescriptionLightDarksgds-cyan-border-color-defaultDefault cyan border colour.
cyan-500
cyan-500
sgds-cyan-border-color-emphasisStronger cyan border for focus or active states.
cyan-700
cyan-200
sgds-cyan-border-color-mutedSubtle cyan border colour.
cyan-200
cyan-700

Text colour tokens

Typography colour tokens define the foreground colours for display, heading, body, label, and link text. They adapt between light and dark themes.

Display

TokenDescriptionLightDarksgds-display-color-defaultDefault colour for large display headings.
gray-1000
gray-000
sgds-display-color-subtleSlightly muted display colour for secondary display text.
gray-800
gray-200

Heading

TokenDescriptionLightDarksgds-heading-color-defaultDefault colour for section headings (h1–h6).
gray-900
gray-100
sgds-heading-color-subtleSlightly muted heading colour for secondary or nested headings.
gray-800
gray-200

Body

TokenDescriptionLightDarksgds-body-color-defaultDefault colour for body text content.
gray-1000
gray-000
sgds-body-color-subtleSlightly muted body colour for captions, metadata, or secondary copy.
gray-700
gray-300

Label

TokenDescriptionLightDarksgds-label-color-defaultDefault colour for form labels and small UI labels.
gray-900
gray-100
sgds-label-color-subtleSlightly muted label colour for helper text or secondary labels.
gray-700
gray-300

Link

TokenDescriptionLightDarksgds-link-color-defaultDefault colour for hyperlinks.
blue-600
blue-400
sgds-link-color-emphasisHover or focus colour for hyperlinks.
blue-700
blue-300

Form

TokenDescriptionLightDarksgds-form-color-defaultDefault text colour within form fields.
gray-900
gray-100
sgds-form-color-subtleSlightly muted colour for helper text or secondary form text.
gray-700
gray-300
sgds-form-color-mutedMuted colour for disabled or placeholder text in forms.
gray-300
gray-700
sgds-form-color-inverseInverse colour for form text on contrasting backgrounds.
gray-100
gray-900
sgds-form-color-fixed-lightFixed light text colour that does not change across themes.
gray-000
gray-000
sgds-form-color-fixed-darkFixed dark text colour that does not change across themes.
gray-1100
gray-1100

Form colour tokens

Form colour tokens cover surfaces, text, and validation states within input fields, checkboxes, radios, and other form controls.

Surface

TokenDescriptionLightDarksgds-form-surface-defaultDefault background surface for form inputs and fields.
gray-000
gray-900
sgds-form-surface-raisedSlightly elevated form surface for nested or grouped inputs.
gray-100
gray-800
sgds-form-surface-emphasisEmphasised form surface for active or focused states.
gray-700
gray-200
sgds-form-surface-subtleSubtle form surface for placeholder or decorative areas.
gray-400
gray-500
sgds-form-surface-mutedMuted surface for disabled or inactive form fields.
gray-200
gray-700
sgds-form-surface-inverseInverse surface for dark-on-light form elements.
gray-900
gray-000
sgds-form-surface-fixed-lightFixed light surface for form fields that always remain light.
gray-000
gray-000
sgds-form-surface-fixed-darkFixed dark surface for form fields that always remain dark.
gray-900
gray-900

Text

TokenDescriptionLightDarksgds-form-color-defaultDefault text colour within form fields.
gray-900
gray-100
sgds-form-color-subtleSlightly muted colour for helper text or secondary form text.
gray-700
gray-300
sgds-form-color-mutedMuted colour for disabled or placeholder text in forms.
gray-300
gray-700
sgds-form-color-inverseInverse colour for form text on contrasting backgrounds.
gray-100
gray-900
sgds-form-color-fixed-lightFixed light text colour that does not change across themes.
gray-000
gray-000
sgds-form-color-fixed-darkFixed dark text colour that does not change across themes.
gray-1100
gray-1100

Primary

TokenDescriptionLightDarksgds-form-primary-surface-defaultDefault primary surface for active checkboxes, radios, and toggles.
product-primary-600
product-primary-600
sgds-form-primary-surface-emphasisStronger primary surface for hover or active interactive form states.
product-primary-700
product-primary-700
sgds-form-primary-color-defaultPrimary colour for selected form element indicators.
product-primary-600
product-primary-400

Success

TokenDescriptionLightDarksgds-form-success-surface-defaultSuccess surface for valid or confirmed form states.
green-600
green-600
sgds-form-success-color-defaultSuccess text or icon colour in form validation.
green-600
green-500
sgds-form-success-border-color-defaultSuccess border colour for valid form fields.
green-500
green-500

Danger

TokenDescriptionLightDarksgds-form-danger-surface-defaultDanger surface for error or invalid form states.
red-600
red-600
sgds-form-danger-color-defaultDanger text or icon colour in form validation.
red-600
red-500
sgds-form-danger-border-color-defaultDanger border colour for invalid form fields.
red-500
red-500

Colour contrast ratios

Colour contrast ratios measure whether text is readable against a background.

WCAG (Web Content Accessibility Guidelines) is the international accessibility standard most government services follow. It scores contrast as a single ratio between 1 (no contrast) and 21 (black on white). Body text needs at least 4.5 to meet the AA conformance level. Large text needs at least 3, since bigger letters are easier to read.

APCA (Accessible Perceptual Contrast Algorithm) is a newer model that's more accurate for real reading. As a rough guide, body text needs an absolute value around 60 or higher.

Got it

Singapore Government Design System

The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.

Past VersionsSGDS v1SGDS v2