Colors
TailwindCSS has a robust set of color classname utilities; all colors have generated classnames for text-, bg- and border-. This will apply to any new color sets you create in your Tailwind configuration. By convention, each color has a range of hues and shades from -100 to -900.
For example, if you want to give something a light pink background, you could add the classname bg-pink-200.
Semantic colors
StackupUI defines a set of semantic color names, as an abstraction on top of the base colors. These colors simply map to existing base colors, and can easily be redefined or expanded if needed.
Here is the full range of available base colors.
Redefining or adding colors
You can change the available colors by modifying your tailwind.config.js. Simply redefine existing colors, or add whatever color names you like. You may add single color values, or -100--900 ranges. See the TailwindCSS color documentation for more details.
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
amaranth: { ... },
chartreuse: { ... },
viridian: { ... },
...
}
}
}
}
Accessibility concerns
You may notice on each of the swatches above, the text is either black or white. This color choice is designed to meet the minimum threshold for text contrast ratio to achieve WCAG 2.0 AA level accessibility. These may not seem obvious, or look "right" or "good" to your eyes. Everyone's eyes are different and these thresholds are designed to maximize the readability of text for most users.
There are many tools available for checking contrast ratios in the browser. Two notable Chrome extensions that make it very easy are the WCAG Contrast checker and Axe Web Accessibility Testing tools. Note that Chrome's built in devtools have contrast checking capabilities as well.
See more information about vision accessibility here.