Open In App

Spectre Background Colors

Spectre colors are one of the most useful utilities, there are two types of things where we can use colors. Like we can set colors for the text and we can set colors for the background.

In this article, we will learn about the various classes available for the background, along with understanding how we can set the colors of the background in Spectre by using these classes.



Spectre background Colors Class:

Syntax:



<element class="bg-colorname"> Content </element>

Below example illustrate the Spectre background Colors.

Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>SPECTRE Background Class</title>
    <link rel="stylesheet"
          href=
    <link rel="stylesheet"
          href=
    <link rel="stylesheet"
          href=
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <strong>SPECTRE Background Colors Class</strong>
        <br><br>
        <p class="bg-error">
            Error Background Color
        </p>
  
        <p class="bg-warning">
            Warning Background Color
        </p>
  
        <p class="bg-success">
            Success Background Color
        </p>
  
        <p class="bg-light">
            Light Background Color
        </p>
  
        <p class="bg-gray">
            Gray Background Color
        </p>
  
        <p class="bg-dark">
            Dark Background Color
        </p>
  
        <p class="bg-secondary">
            Secondary Background Color
        </p>
  
        <p class="bg-primary">
            Primary background Color
        </p>
    </center>
</body>
  
</html>

Output:

Spectre Background Class

Reference: https://picturepan2.github.io/spectre/utilities/colors.html#colors-background


Article Tags :