Skip to main content

Color Shades

Bulma v1 introduces an extended color palette system that provides semantic color variations beyond the basic color helpers. These palette helpers give you access to a comprehensive range of color shades and semantic meanings for each color.

Bestax-bulma refers to the color palette as Color Shades colorShades.

info

The color palette system is built on CSS variables, allowing for runtime customization and dynamic theming. All palette colors work seamlessly with the Theme component for advanced theming scenarios.

Available Shades

info

Bulma v1 introduces comprehensive color shades using CSS variables. You can combine the color prop with the colorShade prop for text colors, and the backgroundColor prop with the backgroundColorShade prop for background colors to access different variations of each color.

Numeric Shades (00-95)

Text Color Shades:

PropertyBulma Class SuffixDescription
colorShade="00"-00Lightest shade (0%)
colorShade="05"-05Very light shade (5%)
colorShade="10"-10Light shade (10%)
colorShade="15"-15Light shade (15%)
colorShade="20"-20Light shade (20%)
colorShade="25"-25Light shade (25%)
colorShade="30"-30Light shade (30%)
colorShade="35"-35Light shade (35%)
colorShade="40"-40Medium light shade (40%)
colorShade="45"-45Medium light shade (45%)
colorShade="50"-50Medium shade (50%)
colorShade="55"-55Medium shade (55%)
colorShade="60"-60Medium dark shade (60%)
colorShade="65"-65Medium dark shade (65%)
colorShade="70"-70Dark shade (70%)
colorShade="75"-75Dark shade (75%)
colorShade="80"-80Dark shade (80%)
colorShade="85"-85Dark shade (85%)
colorShade="90"-90Very dark shade (90%)
colorShade="95"-95Darkest shade (95%)

Background Color Shades:

PropertyBulma Class SuffixDescription
backgroundColorShade="00"-00Lightest shade (0%)
backgroundColorShade="05"-05Very light shade (5%)
backgroundColorShade="10"-10Light shade (10%)
backgroundColorShade="15"-15Light shade (15%)
backgroundColorShade="20"-20Light shade (20%)
backgroundColorShade="25"-25Light shade (25%)
backgroundColorShade="30"-30Light shade (30%)
backgroundColorShade="35"-35Light shade (35%)
backgroundColorShade="40"-40Medium light shade (40%)
backgroundColorShade="45"-45Medium light shade (45%)
backgroundColorShade="50"-50Medium shade (50%)
backgroundColorShade="55"-55Medium shade (55%)
backgroundColorShade="60"-60Medium dark shade (60%)
backgroundColorShade="65"-65Medium dark shade (65%)
backgroundColorShade="70"-70Dark shade (70%)
backgroundColorShade="75"-75Dark shade (75%)
backgroundColorShade="80"-80Dark shade (80%)
backgroundColorShade="85"-85Dark shade (85%)
backgroundColorShade="90"-90Very dark shade (90%)
backgroundColorShade="95"-95Darkest shade (95%)

Semantic Shades

Text Color Shades:

PropertyBulma Class SuffixDescription
colorShade="invert"-invertInverted color
colorShade="light"-lightLight variant
colorShade="dark"-darkDark variant
colorShade="soft"-softSoft variant
colorShade="bold"-boldBold variant
colorShade="on-scheme"-on-schemeContrasting color for scheme

Background Color Shades:

PropertyBulma Class SuffixDescription
backgroundColorShade="invert"-invertInverted color
backgroundColorShade="light"-lightLight variant
backgroundColorShade="dark"-darkDark variant
backgroundColorShade="soft"-softSoft variant
backgroundColorShade="bold"-boldBold variant
backgroundColorShade="on-scheme"-on-schemeContrasting color for scheme

Basic Shade Usage Example

import { Button, Box, Tag, Title } from '@allxsmith/bestax-bulma';

function ColorShadeExamples() {
  return (
    <Box p="4">
      {/* Text color shades */}
      <Title color="primary" colorShade="30" mb="3">
        Primary 30% shade title
      </Title>

      {/* Background color shades */}
      <Box
        backgroundColor="info"
        backgroundColorShade="10"
        color="dark"
        p="3"
        mb="3"
      >
        Light info background (10%)
      </Box>

      <Box
        backgroundColor="success"
        backgroundColorShade="70"
        color="white"
        p="3"
        mb="3"
      >
        Dark success background (70%)
      </Box>

      {/* Button variations */}
      <div>
        <Button color="danger" colorShade="light" mr="2">
          Light danger
        </Button>
        <Button color="warning" colorShade="dark" mr="2">
          Dark warning
        </Button>
        <Button color="primary" colorShade="invert">
          Inverted primary
        </Button>
      </div>

      {/* Tag variations */}
      <div className="mt-4">
        <Tag color="info" colorShade="25" mr="2">
          25% Info
        </Tag>
        <Tag color="success" colorShade="50" mr="2">
          50% Success
        </Tag>
        <Tag color="warning" colorShade="75">
          75% Warning
        </Tag>
      </div>
    </Box>
  );
}

Bulma Primary Colors

The primary color palette includes all the main Bulma colors with their full range of variations. Each color has multiple shades available through the palette system.

Applying Numeric Shades to Primary Colors

You can apply any numeric shade (00-95) to any primary color by combining the color or backgroundColor prop with the appropriate shade prop:

  • For text colors: use color + colorShade
  • For background colors: use backgroundColor + backgroundColorShade
import { Box, Button, Title } from '@allxsmith/bestax-bulma';

function PrimaryColorShades() {
  return (
    <Box p="4">
      {/* Primary text color with numeric shades */}
      <Title color="primary" colorShade="20" size="4" mb="3">
        Primary 20% - Very Light
      </Title>
      <Title color="primary" colorShade="50" size="4" mb="3">
        Primary 50% - Medium
      </Title>
      <Title color="primary" colorShade="80" size="4" mb="3">
        Primary 80% - Dark
      </Title>

      {/* Background variations */}
      <Box
        backgroundColor="primary"
        backgroundColorShade="10"
        color="dark"
        p="3"
        mb="2"
      >
        Primary 10% Background
      </Box>
      <Box
        backgroundColor="primary"
        backgroundColorShade="30"
        p="3"
        mb="2"
        color="white"
      >
        Primary 30% Background
      </Box>
      <Box
        backgroundColor="primary"
        backgroundColorShade="60"
        p="3"
        mb="2"
        color="white"
      >
        Primary 60% Background
      </Box>
      <Box
        backgroundColor="primary"
        backgroundColorShade="90"
        p="3"
        mb="4"
        color="white"
      >
        Primary 90% Background
      </Box>

      {/* Button progression */}
      <div>
        <Button
          backgroundColor="primary"
          backgroundColorShade="15"
          color="primary"
          mr="2"
        >
          15%
        </Button>
        <Button
          backgroundColor="primary"
          backgroundColorShade="35"
          color="white"
          mr="2"
        >
          35%
        </Button>
        <Button
          backgroundColor="primary"
          backgroundColorShade="55"
          color="white"
          mr="2"
        >
          55%
        </Button>
        <Button
          backgroundColor="primary"
          backgroundColorShade="75"
          color="white"
          mr="2"
        >
          75%
        </Button>
        <Button
          backgroundColor="primary"
          backgroundColorShade="95"
          color="white"
        >
          95%
        </Button>
      </div>
    </Box>
  );
}

All Colors Support Numeric Shades

Every Bulma color supports the full range of numeric shades:

import { Box, Tag } from '@allxsmith/bestax-bulma';

function AllColorShades() {
  return (
    <Box p="4">
      {/* Success shades */}
      <div className="mb-4">
        <Tag
          backgroundColor="success"
          backgroundColorShade="20"
          color="success"
          mr="2"
        >
          Success 20%
        </Tag>
        <Tag
          backgroundColor="success"
          backgroundColorShade="40"
          color="white"
          mr="2"
        >
          Success 40%
        </Tag>
        <Tag
          backgroundColor="success"
          backgroundColorShade="60"
          color="white"
          mr="2"
        >
          Success 60%
        </Tag>
        <Tag backgroundColor="success" backgroundColorShade="80" color="white">
          Success 80%
        </Tag>
      </div>

      {/* Info shades */}
      <div className="mb-4">
        <Tag
          backgroundColor="info"
          backgroundColorShade="25"
          color="info"
          mr="2"
        >
          Info 25%
        </Tag>
        <Tag
          backgroundColor="info"
          backgroundColorShade="45"
          color="white"
          mr="2"
        >
          Info 45%
        </Tag>
        <Tag
          backgroundColor="info"
          backgroundColorShade="65"
          color="white"
          mr="2"
        >
          Info 65%
        </Tag>
        <Tag backgroundColor="info" backgroundColorShade="85" color="white">
          Info 85%
        </Tag>
      </div>

      {/* Warning shades */}
      <div className="mb-4">
        <Tag
          backgroundColor="warning"
          backgroundColorShade="30"
          color="warning"
          mr="2"
        >
          Warning 30%
        </Tag>
        <Tag
          backgroundColor="warning"
          backgroundColorShade="50"
          color="white"
          mr="2"
        >
          Warning 50%
        </Tag>
        <Tag
          backgroundColor="warning"
          backgroundColorShade="70"
          color="white"
          mr="2"
        >
          Warning 70%
        </Tag>
        <Tag backgroundColor="warning" backgroundColorShade="90" color="white">
          Warning 90%
        </Tag>
      </div>

      {/* Danger shades */}
      <div>
        <Tag
          backgroundColor="danger"
          backgroundColorShade="35"
          color="danger"
          mr="2"
        >
          Danger 35%
        </Tag>
        <Tag
          backgroundColor="danger"
          backgroundColorShade="55"
          color="white"
          mr="2"
        >
          Danger 55%
        </Tag>
        <Tag
          backgroundColor="danger"
          backgroundColorShade="75"
          color="white"
          mr="2"
        >
          Danger 75%
        </Tag>
        <Tag backgroundColor="danger" backgroundColorShade="95" color="white">
          Danger 95%
        </Tag>
      </div>
    </Box>
  );
}

Primary Color Variations

PropertyBulma ClassDescription
color="primary"has-text-primaryBase primary color
color="primary" colorShade="light"has-text-primary-lightLight primary variant
color="primary" colorShade="dark"has-text-primary-darkDark primary variant
color="primary" colorShade="soft"has-text-primary-softSoft primary variant
color="primary" colorShade="bold"has-text-primary-boldBold primary variant
color="primary" colorShade="on-scheme"has-text-primary-on-schemePrimary color optimized for scheme backgrounds
color="primary" colorShade="00"has-text-primary-00Primary 0% shade (lightest)
color="primary" colorShade="25"has-text-primary-25Primary 25% shade
color="primary" colorShade="50"has-text-primary-50Primary 50% shade
color="primary" colorShade="75"has-text-primary-75Primary 75% shade
color="primary" colorShade="95"has-text-primary-95Primary 95% shade (darkest)
PropertyBulma ClassDescription
color="link"has-text-linkBase link color
color="link" colorShade="light"has-text-link-lightLight link variant
color="link" colorShade="dark"has-text-link-darkDark link variant
color="link" colorShade="soft"has-text-link-softSoft link variant
color="link" colorShade="bold"has-text-link-boldBold link variant

Info Color Variations

PropertyBulma ClassDescription
color="info"has-text-infoBase info color
color="info" colorShade="light"has-text-info-lightLight info variant
color="info" colorShade="dark"has-text-info-darkDark info variant
color="info" colorShade="soft"has-text-info-softSoft info variant
color="info" colorShade="bold"has-text-info-boldBold info variant

Success Color Variations

PropertyBulma ClassDescription
color="success"has-text-successBase success color
color="success" colorShade="light"has-text-success-lightLight success variant
color="success" colorShade="dark"has-text-success-darkDark success variant
color="success" colorShade="soft"has-text-success-softSoft success variant
color="success" colorShade="bold"has-text-success-boldBold success variant

Warning Color Variations

PropertyBulma ClassDescription
color="warning"has-text-warningBase warning color
color="warning" colorShade="light"has-text-warning-lightLight warning variant
color="warning" colorShade="dark"has-text-warning-darkDark warning variant
color="warning" colorShade="soft"has-text-warning-softSoft warning variant
color="warning" colorShade="bold"has-text-warning-boldBold warning variant

Danger Color Variations

PropertyBulma ClassDescription
color="danger"has-text-dangerBase danger color
color="danger" colorShade="light"has-text-danger-lightLight danger variant
color="danger" colorShade="dark"has-text-danger-darkDark danger variant
color="danger" colorShade="soft"has-text-danger-softSoft danger variant
color="danger" colorShade="bold"has-text-danger-boldBold danger variant

Text Color

Apply palette text colors using the color and colorShade props together. This provides semantic meaning while maintaining visual consistency.

Example Usage

import { Title, SubTitle, Content, Box } from '@allxsmith/bestax-bulma';

function PaletteTextExample() {
  return (
    <Box p="4">
      <Title color="primary" colorShade="bold" size="2" mb="3">
        Bold Primary Heading
      </Title>

      <SubTitle color="info" colorShade="soft" size="4" mb="4">
        Soft Info Subheading
      </SubTitle>

      <Content>
        <p>
          <span color="success" colorShade="dark">
            Success message
          </span>{' '}
          - Operation completed successfully.
        </p>
        <p>
          <span color="warning" colorShade="bold">
            Warning notice
          </span>{' '}
          - Please review before proceeding.
        </p>
        <p>
          <span color="danger" colorShade="light">
            Error message
          </span>{' '}
          - Something went wrong.
        </p>
      </Content>
    </Box>
  );
}

Background Color

Apply palette background colors using the backgroundColor and backgroundColorShade props together. This creates sophisticated color schemes with semantic meaning.

Primary Background Variations

PropertyBulma ClassDescription
backgroundColor="primary"has-background-primaryBase primary background
backgroundColor="primary" backgroundColorShade="light"has-background-primary-lightLight primary background
backgroundColor="primary" backgroundColorShade="dark"has-background-primary-darkDark primary background
backgroundColor="primary" backgroundColorShade="soft"has-background-primary-softSoft primary background
backgroundColor="primary" backgroundColorShade="bold"has-background-primary-boldBold primary background

Status Background Variations

PropertyBulma ClassDescription
backgroundColor="success" backgroundColorShade="light"has-background-success-lightLight success background
backgroundColor="info" backgroundColorShade="soft"has-background-info-softSoft info background
backgroundColor="warning" backgroundColorShade="light"has-background-warning-lightLight warning background
backgroundColor="danger" backgroundColorShade="soft"has-background-danger-softSoft danger background

Example Usage

import { Notification, Card, Box, Message } from '@allxsmith/bestax-bulma';

function PaletteBackgroundExample() {
  return (
    <div>
      <Notification
        backgroundColor="success"
        backgroundColorShade="light"
        color="success"
        className="mb-4"
      >
        <strong>Success!</strong> Your changes have been saved.
      </Notification>

      <Notification
        backgroundColor="info"
        backgroundColorShade="soft"
        color="info"
        colorShade="dark"
        className="mb-4"
      >
        <strong>Info:</strong> System maintenance scheduled.
      </Notification>

      <Card
        backgroundColor="warning"
        backgroundColorShade="light"
        className="mb-4"
      >
        <Card.Content>
          <Title color="warning" colorShade="dark" size="5">
            Warning Notice
          </Title>
          <Content color="warning" colorShade="bold">
            Please backup your data before proceeding.
          </Content>
        </Card.Content>
      </Card>

      <Message backgroundColor="danger" backgroundColorShade="soft">
        <Message.Header backgroundColor="danger" color="white">
          Example Error Message
        </Message.Header>
        <Message.Body color="danger" colorShade="dark">
          This is an example of how error messages would appear using danger
          color shades.
        </Message.Body>
      </Message>
    </div>
  );
}

Numeric Shade Variations

tip

In addition to semantic shade names (light, dark, soft, bold), you can use numeric shades from 00 to 95 for precise color control.

Numeric Shade Examples

import { Box, Button, Tag } from '@allxsmith/bestax-bulma';

function NumericShadeExample() {
  return (
    <Box p="4">
      {/* Primary color progression */}
      <div className="mb-4">
        <Title size="5" mb="3">
          Primary Color Progression
        </Title>
        <Box backgroundColor="primary" backgroundColorShade="10" p="2" mb="2">
          Primary 10% - Very light
        </Box>
        <Box backgroundColor="primary" backgroundColorShade="25" p="2" mb="2">
          Primary 25% - Light
        </Box>
        <Box
          backgroundColor="primary"
          backgroundColorShade="50"
          p="2"
          mb="2"
          color="dark"
        >
          Primary 50% - Medium
        </Box>
        <Box
          backgroundColor="primary"
          backgroundColorShade="75"
          p="2"
          mb="2"
          color="dark"
        >
          Primary 75% - Dark
        </Box>
        <Box
          backgroundColor="primary"
          backgroundColorShade="90"
          p="2"
          color="dark"
        >
          Primary 90% - Very dark
        </Box>
      </div>

      {/* Button variations */}
      <div className="mb-4">
        <Title size="5" mb="3">
          Button Variations
        </Title>
        <Button
          backgroundColor="info"
          backgroundColorShade="20"
          color="info"
          mr="2"
        >
          20% Info
        </Button>
        <Button
          backgroundColor="success"
          backgroundColorShade="40"
          color="white"
          mr="2"
        >
          40% Success
        </Button>
        <Button
          backgroundColor="warning"
          backgroundColorShade="60"
          color="white"
          mr="2"
        >
          60% Warning
        </Button>
        <Button
          backgroundColor="danger"
          backgroundColorShade="80"
          color="white"
        >
          80% Danger
        </Button>
      </div>

      {/* Tag variations */}
      <div>
        <Title size="5" mb="3">
          Tag Variations
        </Title>
        <Tag color="primary" colorShade="30" mr="2">
          30%
        </Tag>
        <Tag color="info" colorShade="45" mr="2">
          45%
        </Tag>
        <Tag color="success" colorShade="65" mr="2">
          65%
        </Tag>
        <Tag color="warning" colorShade="85">
          85%
        </Tag>
      </div>
    </Box>
  );
}

Advanced Palette Combinations

Create sophisticated designs by combining different aspects of the color palette:

import { Card, Title, Content, Button, Box } from '@allxsmith/bestax-bulma';

function AdvancedPaletteExample() {
  return (
    <Box p="4">
      {/* Status cards with coordinated colors */}
      <Box display="flex" flexDirection="column" gap="4">
        {/* Success Card */}
        <Card backgroundColor="success" backgroundColorShade="05">
          <Card.Content>
            <Title color="success" colorShade="dark" size="5">
              Task Completed
            </Title>
            <Content color="success" colorShade="70">
              Your deployment was successful. All services are running normally.
            </Content>
            <Button
              backgroundColor="success"
              backgroundColorShade="bold"
              color="white"
              size="small"
            >
              View Details
            </Button>
          </Card.Content>
        </Card>

        {/* Info Card */}
        <Card backgroundColor="info" backgroundColorShade="10">
          <Card.Content>
            <Title color="info" colorShade="dark" size="5">
              System Update
            </Title>
            <Content color="info" colorShade="75">
              A new version is available. Update recommended for improved
              performance.
            </Content>
            <Button
              backgroundColor="info"
              backgroundColorShade="80"
              color="white"
              size="small"
            >
              Update Now
            </Button>
          </Card.Content>
        </Card>

        {/* Warning Card */}
        <Card backgroundColor="warning" backgroundColorShade="15">
          <Card.Content>
            <Title color="warning" colorShade="dark" size="5">
              Action Required
            </Title>
            <Content color="warning" colorShade="80">
              Your subscription will expire in 7 days. Please renew to continue
              service.
            </Content>
            <Button
              backgroundColor="warning"
              backgroundColorShade="bold"
              color="white"
              size="small"
            >
              Renew Now
            </Button>
          </Card.Content>
        </Card>
      </Box>
    </Box>
  );
}

Theme Integration

info

Palette colors work seamlessly with the Theme component for dynamic color schemes. You can override palette colors at runtime using CSS variables.

import { Theme, Box, Button, Title } from '@allxsmith/bestax-bulma';

function ThemedPaletteExample() {
  return (
    <Theme primaryH="270" primaryS="100%" primaryL="50%" isRoot>
      <Box p="4">
        <Title color="primary" colorShade="bold" mb="3">
          Custom Purple Theme
        </Title>

        <Box backgroundColor="primary" colorShade="10" p="3" mb="3">
          <Content color="primary" colorShade="dark">
            This uses the custom purple primary color with palette variations.
          </Content>
        </Box>

        <Button backgroundColor="primary" colorShade="60" color="white">
          Custom Primary Button
        </Button>
      </Box>
    </Theme>
  );
}

Learn More

For comprehensive information about color properties and shades, see the useBulmaClasses API documentation.

See Also