Skip to main content Sidebar
On this page
Skip to table of contents

Colour

Placer Toolkit’s colour system is made up of CSS custom properties to help with consistent colour usage throughout your project.

Colours are organised in three main categories:

Colour scales

Colour scales are determined by your colour palette and are made up of the lowest level colour tokens in your theme. Each token is identified by a name, like red and blue, and numerical tint based on the colour’s lightness. On this scale, 95 is close to pure white and 05 is close to pure black.

You can use these tints to ensure accessible colour contrast per WCAG 2.2 success criteria:

  • A difference of 40 ensures a minimum 3∶1 contrast ratio, suitable for large text and icons (AA)
  • A difference of 50 ensures a minimum 4,5∶1 contrast ratio, suitable for normal text (AA) and large text (AAA)
  • A difference of 60 ensures a minimum 7∶1 contrast ratio, suitable for all text (AAA)

The default palette defines 10 hues each with a scale of 11 tints using the format --pc-color-{hue}-{tint}.

Grey
--pc-color-grey-{tint}
05
10
20
30
40
50
60
70
80
90
95
Red
--pc-color-red-{tint}
05
10
20
30
40
50
60
70
80
90
95
Orange
--pc-color-orange-{tint}
05
10
20
30
40
50
60
70
80
90
95
Yellow
--pc-color-yellow-{tint}
05
10
20
30
40
50
60
70
80
90
95
Green
--pc-color-green-{tint}
05
10
20
30
40
50
60
70
80
90
95
Cyan
--pc-color-cyan-{tint}
05
10
20
30
40
50
60
70
80
90
95
Blue
--pc-color-blue-{tint}
05
10
20
30
40
50
60
70
80
90
95
Indigo
--pc-color-indigo-{tint}
05
10
20
30
40
50
60
70
80
90
95
Purple
--pc-color-purple-{tint}
05
10
20
30
40
50
60
70
80
90
95
Pink
--pc-color-pink-{tint}
05
10
20
30
40
50
60
70
80
90
95

Semantic scales

Any hue can be mapped to neutral, primary, success, warning and danger scales. Like the tokens in the colour scale, each token is identified by its semantic group and a numerical tint using the format --pc-color-{group}-{tint}.

Neutral
--pc-color-neutral-{tint}
05
10
20
30
40
50
60
70
80
90
95
Primary
--pc-color-primary-{tint}
05
10
20
30
40
50
60
70
80
90
95
Success
--pc-color-success-{tint}
05
10
20
30
40
50
60
70
80
90
95
Warning
--pc-color-warning-{tint}
05
10
20
30
40
50
60
70
80
90
95
Danger
--pc-color-danger-{tint}
05
10
20
30
40
50
60
70
80
90
95

Foundational colours

Foundational colours lay the groundwork for the content and structure of your project. These colours are named according to their role in your theme.

Surfaces

Surfaces are background layers that other content rests on. Surface colours convey visual hierarchy through a sense of elevation. For example, --pc-color-surface-raised appears closest to the user and is used for elements like dialogs and popup menus, while --pc-color-surface-lowered appears farther away and is used for passive containers such as inset sections or grouped form areas.

Custom propertyPreview
--pc-color-surface-raised
--pc-color-surface-default
--pc-color-surface-lowered
--pc-color-surface-border

Text

Text colours are used for standard text. We recommend a minimum 4,5∶1 contrast ratio between text and surface colours.

Custom propertyPreview
--pc-color-text-normal
AaBb
--pc-color-text-quiet
AaBb
--pc-color-text-link
AaBb

Overlays

Overlays provide a backdrop to isolate content, often allowing background context to show through.

Custom propertyPreview
--pc-color-overlay-modal
--pc-color-overlay-inline

Shadow

Placer Toolkit uses a single colour for all shadows. This is used alongside other shadow tokens to construct your theme’s shadows.

Custom propertyPreview
--pc-color-shadow

Interactions

Focus

Placer Toolkit uses a single focus colour for predictable keyboard navigation. This is used along other focus tokens to construct --pc-focus-ring. We recommend a minimum 3∶1 contrast ratio against surface and background colours wherever possible.

Custom propertyPreview
--pc-color-focus

Hover and active states

Placer Toolkit leverages color-mix() to achieve consistent hover and active states across components without the need for untold numbers of handpicked colours. Through color-mix(), these custom properties contextually generate hover and active colours based on the colour of the component.

Custom propertyPreview
--pc-color-mix-hover
mixed
--pc-color-mix-active
mixed

Semantic colours

Semantic colours reinforce a specific message, intended use or expected results through familiar and meaningful hues. Each colour is identified by its semantic group, role and attention using the --pc-color-{group}-{role}-{attention} format. There are five groups of semantic colours:

  • Primary to emphasise your accent colour.
  • Success for validity or confirmation.
  • Neutral for ordinary or inactive content.
  • Warning for caution or uncertainty.
  • Danger for errors or risk.

Each group defines colours for specific roles so that colours can be easily assembled with predictable results and readable contrast. There are three roles:

  • Fill for background colours or areas larger than a few pixels.
  • Border for borders, dividers and other stroke‐width elements.
  • On for content displayed on a fill, paired with the same attention.

Finally, each colour is named according to how much attention it draws. Here, we use noise as an analogy: A loud noise draws more attention than a quiet one. There are three levels of attention:

  • Quiet draws the least attention.
  • Normal draws some attention.
  • Loud draws the most attention.
Custom propertyprimarysuccessneutralwarningdanger
--pc-color-*-fill-quiet
--pc-color-*-fill-normal
--pc-color-*-fill-loud
--pc-color-*-border-quiet
--pc-color-*-border-normal
--pc-color-*-border-loud
--pc-color-*-on-quiet
AaBb
AaBb
AaBb
AaBb
AaBb
--pc-color-*-on-normal
AaBb
AaBb
AaBb
AaBb
AaBb
--pc-color-*-on-loud
AaBb
AaBb
AaBb
AaBb
AaBb

We’d love to hear from you. Please reach out to us with any questions or enquiries you may have.

You can contact us via e‐mail at placer.coc.reports+contact@gmail.com.

We look forward to hearing from you!

Got it!
Dangerous lands

Whoa! You’ve wandered into the dangerous lands of Placer Toolkit. Version 0 is out of date and doesn’t meet EU privacy standards, including GDPR.

Want the latest powers, security and compliance? Stick with the current version of Placer Toolkit!

Yikes! Power up!

Our site is 100 % cookie‐free! We value your privacy, which is why we don’t store any cookies or personal information related to you.

Your browser history is safe from crumbs, and your data is protected, aligning with modern privacy standards like the GDPR. Enjoy your visit without a single digital cookie in sight! 🍪🚫

View our Privacy Policy for more information.

Got it!