Colours Beta
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.
Custom Colours
These are custom colours for users’ customisation. Usually account/card/background colours.
External Colours
These colours are for plugins or external products, which are out the scope of GDS.
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.
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 name | Usage example |
---|---|
--g-color-interactive-primary | Primary Button background |
--g-color-interactive-secondary | Focus ring |
--g-color-interactive-tertiary | Tabs active item background |
--g-color-success | Success Badge text |
--g-color-success-weak | Success Badge background |
--g-color-error | Error Badge text |
--g-color-error-weak | Error Badge background |
--g-color-warning | Warning Alert icon |
--g-color-warning-strong | Warning Badge text |
--g-color-warning-weak | Warning Badge background |
--g-color-info | Info Badge text |
--g-color-info-weak | Info Badge background |
--g-color-text-primary | Paragraph text |
--g-color-text-secondary | TextInput placeholder text |
--g-color-text-disabled | Disabled input placeholder text |
--g-color-text-inverted-primary | Filled Badge text |
--g-color-text-inverted-secondary | Faded Paragraph text on product colour |
--g-color-text-inverted-disabled | Disabled TabItem text on product colour |
--g-color-text-inverted-adaptive | Pill text |
--g-color-surface-primary | Card background |
--g-color-surface-secondary | Page background |
--g-color-surface-tertiary | Default CardHeader background |
--g-color-surface-alternate | Table row hovered background |
--g-color-surface-disabled | Disabled TextInput background |
--g-color-surface-inverted | FixedButton background |
--g-color-border-primary | TextInput border |
--g-color-border-secondary | Separated LabeledList border |
--g-color-border-hover | Hovered TextInput border |
--g-color-border-disabled | Disabled TextInput border |
--g-color-border-inverted-primary | Avatar badge icon border |
--g-color-border-inverted-secondary | Secondary Button border on product colour |
--g-color-fill-primary | StatusInfo Icon fill |
--g-color-fill-disabled | Disabled Switch knob fill |
--g-color-fill-inverted | Active Switch knob fill |
--g-color-overlay-primary | Modal backdrop |
--g-color-overlay-hover | Toggle hovered background |
--g-color-overlay-active | Active Toggle background |
--g-color-overlay-active-hover | Active toggle hovered background |
--g-color-sanity | Sanity theme |
--g-color-shadow-dropdown | Dropdown shadow |