--- title: Color Palette helpers layout: docs theme: helpers doc-tab: helpers doc-subtab: helpers-palette breadcrumb: - home - documentation - helpers - helpers-palette ---

Bulma comes with 7 primary colors:

text
link
primary
info
success
warning
danger

Bulma will automatically generate a collection of shades for each of those colors. These act as a color palette you can use to play with different variants of a same color.

{% include docs/elements/anchor.html name="Text color" %}
Bulma comes with CSS classes for 27 shades of each color. Each shade also comes with an invert equivalent, that is useful to combine in a foreground/background combination.
{% for shade in site.data.palette %} {% assign background = "var(--bulma-primary" | append: shade | append: ")" %} {% assign invert = "var(--bulma-primary" | append: shade | append: "-invert)" %} {% endfor %}
Class Code Example Invert
has-text-primary{{ shade }} {% highlight html %}

Hello Bulma

{% endhighlight %}
Hello Bulma {% include docs/elements/color-swatch.html background=background %} Hello Bulma {% include docs/elements/color-swatch.html background=invert %}
{% include docs/elements/anchor.html name="Background color" %}
All 27 shades are also available as background helpers. Combined with the invert color as foreground, it's easy to make readable elements with just 2 classes.
{% for shade in site.data.palette %} {% assign background = "var(--bulma-primary" | append: shade | append: ")" %} {% endfor %}
Class Code Example Swatch
has-background-primary{{ shade }}
{% highlight html %}

Hello Bulma

{% endhighlight %}
Hello Bulma {% include docs/elements/color-swatch.html background=background %}