SGDS Colour classes
Colour classes
SGDS contains predefined classes that apply different colours to specific
elements. You can use these colour classes by adding is-
or
has-
prefixes to most elements.
white
#ffffff
black
#000000
light
#f5f5f5
dark
#323232
primary
#6137b3
Contrast Ratio : 7.76
secondary
#3d68bd
Contrast Ratio : 5.29
link
#0070f0
Contrast Ratio : 4.59
info
#008094
Contrast Ratio : 4.65
success
#008549
Contrast Ratio : 4.72
warning1
#f5a524
Contrast Ratio : 10.29
danger
#cf021a
Contrast Ratio : 5.71
warning
class
only meet WCAG contrast requirements when paired with black,
e.g. black text within elements with .has-background-warning
Component colours
Use the is-*color*
class to set the component colours for:
Example of is-*color*
classes for the Button component:
Class | Example | Usage |
---|---|---|
is-white | ||
is-black | ||
is-light | ||
is-dark | ||
is-primary | ||
is-secondary | ||
is-link | ||
is-info | ||
is-success | ||
is-warning | ||
is-danger |
Text colours
Class | Example | Usage |
---|---|---|
has-text-white |
Use the has-text-white
colour class to set text colour
|
|
has-text-black |
Use the has-text-black
colour class to set text colour
|
|
has-text-light |
Use the has-text-light
colour class to set text colour
|
|
has-text-dark |
Use the has-text-dark
colour class to set text colour
|
|
has-text-primary |
Use the has-text-primary
colour class to set text colour
|
|
has-text-secondary |
Use the has-text-secondary
colour class to set text colour
|
|
has-text-link |
Use the has-text-link
colour class to set text colour
|
|
has-text-info |
Use the has-text-info
colour class to set text colour
|
|
has-text-success |
Use the has-text-success
colour class to set text colour
|
|
has-text-warning |
Use the has-text-warning
colour class to set text colour
|
|
has-text-danger |
Use the has-text-danger
colour class to set text colour
|
Background colours
Class | Example | Usage |
---|---|---|
has-background-white |
Use the has-background-white colour
class to set background colour
|
|
has-background-black |
Use the has-background-black colour
class to set background colour
|
|
has-background-light |
Use the has-background-light colour
class to set background colour
|
|
has-background-dark |
Use the has-background-dark colour
class to set background colour
|
|
has-background-primary |
Use the has-background-primary colour
class to set background colour
|
|
has-background-secondary |
Use the has-background-secondary colour
class to set background colour
|
|
has-background-link |
Use the has-background-link colour
class to set background colour
|
|
has-background-info |
Use the has-background-info colour
class to set background colour
|
|
has-background-success |
Use the has-background-success colour
class to set background colour
|
|
has-background-warning |
Use the has-background-warning colour
class to set background colour
|
|
has-background-danger |
Use the has-background-danger colour
class to set background colour
|
Can't find a component?
Let us know what you need and we’ll be happy to look into it