We strongly encourage our community to follow this guidance. It’s not mandatory yet, but it will become part of the MOD Service Assessments in due time. Questions? Contact your friendly MOD Design System team: email@example.com.
We use named colours (e.g. Neutral or Action) instead of colour literals (e.g. blue). Colour palettes represent functions, so that we can make interactions and contexts easy to distinguish.
Our design system provides five core palettes and six supplementary palettes.
If using colour to convey information, you will need an accessible alternative.
According to the Colour Blindness Awareness Association, 1 in 12 men and 1 in 200 women are colourblind worldwide.
Use the Neutral palette for application UI.
Neutral shades are the base for MOD.UK applications. Use this palette to build user interfaces (UIs) and most backgrounds, borders, text colour and shadows for components.
Use the Action palette for primary actions.
Action shades indicate the primary action of a component or page, for example a Call To Action (CTA) button on a form.
Use the Action palette for components that need to stand out from the neutral background palette.
Styling an Alert component with the Action palette gets the user’s attention but it will not have any of the associated connotations that the Success/Warning/Danger has.
Use the Action palette for focus and active states.
Show when for example a button or tab is active by using the Action palette to highlight these components.
Call-out colours are used to improve the semantics of particular Actions. Use these palettes sparingly as they capture the user’s attention.
We connect certain attention-grabbing colours to certain types of actions, so we can communicate types of actions through colours. For example, we represent Danger with red. Don’t overuse them, as this takes away the attention-grabbing potential.
Don’t stack Call-out colours.
It’s very confusing to, for example, put a Success text on a Danger background. It’s also likely to fail accessibility colour ratios.
Use the Success palette for positive feedback.
Use the Success palette to confirm positive interactions.
By default, the Action palette will be the most appropriate colour choice. Only use it if there’s a clear need to affirm the action, for example to confirm a form is successfully submitted.
Use the Warning palette to indicate an action or message that may produce undesirable results.
Use the Warning palette to highlight potential problems to the user.
For example, use the Warning palette to highlight outliers when visualising data.
Don’t use the Warning palette for focus states.
Use the Action or Danger palette to highlight a focussed component.
Use the Danger palette for destructive actions.
Only use the Danger palette when the outcome may have negative effects, such as permanently deleting data.
Use the Danger palette to highlight error states that require the user’s attention.
Use supplementary colours to support the main colour palettes only. They can be used for categorisation and data visualisation, but they don’t have any state associated with them.