#ClimateEmergency

Colours Beta

Open in Figma

The following are the official George colours. Best practices:

  • All colours have names. Use those names when communicating them.
  • SASS variables containing colours have a $color- prefix.
  • Use SASS variables instead of hard-coded hex codes, e.g. $color-ui-red.
  • Never use a colour picker tool to guess a hex code from an image, not even from a design document. When in doubt, ask the design team.

For backwards compatibility, the old colour variables still exist. DEPRECATED

UI Colours

These colours are in use in George for UI elements.

Loading demo…

Custom Colours

These are custom colours for users’ customisation. Usually account/card/background colours.

Loading demo…

External Colours

These colours are for plugins or external products, which are out the scope of GDS.

Loading demo…

Colour classes

To add a (dynamic) background or text colour to any element, you can use the .g-bg-* or .g-fg-* classes where the asterisk matches the colour names above (e.g. .g-bg-berry).

  • .g-bg-* will change the background colour and the element automatically gets a corresponding foreground colour assigned (white for dark backgrounds, a dark grey for light colours).
  • .g-fg-* will only change the foreground colour.
Loading demo…

Semantic colour tokens

These help communicate the intent of their usage and reference the colours mentioned above. Use the CSS variables listed below to style your components to work both in light and dark mode.

Token nameUsage example
--g-color-interactive-primaryPrimary Button background
--g-color-interactive-secondaryFocus ring
--g-color-interactive-tertiaryTabs active item background
--g-color-successSuccess Badge text
--g-color-success-weakSuccess Badge background
--g-color-errorError Badge text
--g-color-error-weakError Badge background
--g-color-warningWarning Alert icon
--g-color-warning-strongWarning Badge text
--g-color-warning-weakWarning Badge background
--g-color-infoInfo Badge text
--g-color-info-weakInfo Badge background
--g-color-text-primaryParagraph text
--g-color-text-secondaryTextInput placeholder text
--g-color-text-disabledDisabled input placeholder text
--g-color-text-inverted-primaryFilled Badge text
--g-color-text-inverted-secondaryFaded Paragraph text on product colour
--g-color-text-inverted-disabledDisabled TabItem text on product colour
--g-color-text-inverted-adaptivePill text
--g-color-surface-primaryCard background
--g-color-surface-secondaryPage background
--g-color-surface-tertiaryDefault CardHeader background
--g-color-surface-alternateTable row hovered background
--g-color-surface-disabledDisabled TextInput background
--g-color-surface-invertedFixedButton background
--g-color-border-primaryTextInput border
--g-color-border-secondarySeparated LabeledList border
--g-color-border-hoverHovered TextInput border
--g-color-border-disabledDisabled TextInput border
--g-color-border-inverted-primaryAvatar badge icon border
--g-color-border-inverted-secondarySecondary Button border on product colour
--g-color-fill-primaryStatusInfo Icon fill
--g-color-fill-disabledDisabled Switch knob fill
--g-color-fill-invertedActive Switch knob fill
--g-color-overlay-primaryModal backdrop
--g-color-overlay-hoverToggle hovered background
--g-color-overlay-activeActive Toggle background
--g-color-overlay-active-hoverActive toggle hovered background
--g-color-sanitySanity theme
--g-color-shadow-dropdownDropdown shadow