Work in progress

Android Colour

Colours are defined as tokens in the Android design system and exposed to Jetpack Compose through MaterialTheme.

The palette adapts to light and dark themes, and includes separate high-contrast light and dark variants. NHSAppTheme selects the matching NHS colour set based on the active theme and system contrast setting.

How to use

In composables, use the theme-aware colour properties so colours adapt to the active variant:

Text(
    text = "Appointments",
    color = MaterialTheme.nhsBlue
)

Inside a composable, access Material 3 theme roles through MaterialTheme.colorScheme. Choose a role that matches the purpose of the element, and use its corresponding on… role for content such as text or icons placed on it.

For example, use primary for a primary action’s background and onPrimary for its content:

Surface(color = MaterialTheme.colorScheme.primary) {
    Text(
        text = "Continue",
        color = MaterialTheme.colorScheme.onPrimary
    )
}

Semantic

Use semantic theme properties for their intended role.

Use colorScheme.background for screens and nhsSecondaryBackground for raised panels.

MaterialTheme property path Light Dark HC light HC dark
colorScheme.background
nhsSecondaryBackground
colorScheme.primary
colorScheme.onPrimary
colorScheme.error
colorScheme.onError
colorScheme.surface
colorScheme.onSurface
colorScheme.onSurfaceVariant

Core palette

The core palette includes the NHS brand colours and supporting accent colours.

MaterialTheme property path Light Dark HC light HC dark
nhsBlue
nhsGreen
nhsRed
nhsOrange
nhsAqua
nhsPurple
nhsPink
nhsYellow
nhsWarmYellow

Dark variants

Dark variants provide a deeper colour for use where the design calls for stronger contrast with a pale colour.

MaterialTheme property path Light Dark HC light HC dark
nhsDarkBlue
nhsDarkGreen
nhsDarkRed
nhsDarkOrange
nhsDarkYellow
nhsDarkAqua
nhsDarkPurple
nhsDarkPink

Pale variants

Pale variants provide a softer background colour for the corresponding colour family.

MaterialTheme property path Light Dark HC light HC dark
nhsPaleBlue
nhsPaleGreen
nhsPaleRed
nhsPaleOrange
nhsPaleYellow
nhsPaleAqua
nhsPalePurple
nhsPalePink

Greyscale

Greyscale tokens include text and neutral surfaces.

MaterialTheme property path Light Dark HC light HC dark
nhsBlack
nhsGrey
nhsGrey2
nhsGrey3
nhsGrey4
nhsGrey5
nhsWhite