The color palette includes primary, secondary, success, warning, and error colors. The primary color is used for branding and main actions, while the secondary color complements the primary and is used for secondary elements. The success color, usually green, indicates positive actions. The warning color, often yellow or orange, is used for cautionary information, and the error color, typically red, signifies errors or critical actions.
Colors#
Keep React includes an expertly-crafted default color palette out-of-the-box that is a great starting point if you don’t have your own specific branding in mind.
Customize color palette#
You can customize the color palette by following these steps:
Open your tailwind.config.ts file.
import { keepTheme } from "keep-react/keepTheme"; const colorsPalette = { primary:{ //... 25 - 900 }, secondary:{ //... 25 - 900 }, success:{ //... 25 - 900 }, warning:{ //... 25 - 900 }, error:{ //... 25 - 900 }, } const config = { //...config } export default keepTheme(config, colorsPalette);
Customize Single Color
import { keepTheme, colors } from "keep-react/keepTheme"; const colorsPalette = { ...colors, metal: { ...colors.metal, 500: '...', 600: '...', 700: '...', 800: '...', 900: '...', } } const config = { //...config } export default keepTheme(config, colorsPalette);
Don't do this
❌ DON'T DO THIS const colorsPalette = { background: { 25: '...', }, } ✔ DO THIS const colorsPalette = { metal: { 25: 'Your color', }, } ✔ DO THIS import { colors } from 'keep-react/keepTheme' const colorsPalette = { ...colors, background: { 25: 'Your color', }, }