Rokkit Logo 1.0.0-next.122

?

Color Palette

The Rokkit library provides a versatile palette containing various shades of the following colors:

Available Colors:

  • Neutral
  • Primary
  • Secondary
  • Accent
  • Success
  • Warning
  • Danger
  • Info

Each color in the palette has shades ranging from 50 to 950, allowing users to customize the appearance of their applications with a wide range of color options.

The preview section shows the current palette with all the colors and their respective shades. Try clicking on the dark/light mode toggle to see how the palette looks in different modes.

Color Palette Preview

neutral

primary

secondary

accent

success

warning

danger

info

Highlighting code...

Usage

Users can apply colors from the Rokkit palette to different elements of their application using the following classes:

Background Colors

Highlighting code...

Border Colors

Highlighting code...

Text Colors

Highlighting code...

💡CSS Variables

You can also use CSS variables to apply colors directly to elements:

Highlighting code...

Customization

The Rokkit library allows users to customize the palette by calling the themeRules(themename, mapping, colors) function.

Function Parameters

  • themename: Name of the theme to be customized
  • mapping: A map that provides overrides for specific colors in the palette
  • colors: An object containing standard defaults for all palette colors

Example Implementation

Highlighting code...

Integration

You can include the call to the themeRules function in your uno.config.js in the rules section to apply the custom theme to your application.

Ready to customize?

By using the themeRules function, users can tailor the Rokkit palette to suit the specific design requirements of their application. They can also utilize CSS variables for more granular control over color application.