We provide a default color palette that you can use to customize your theme in case that you do not have any brand colors.
In case that you do not have custom colors defined in your project, you can import the @siimple/colors
module in your configuration file to access the default colors provided in siimple.
import colors from "@siimple/colors"; // Comfigure siimple using the color palette export default { colors: { primary: colors.mint["500"], secondary: colors.royal["600"], text: colors.gray["700"], // ...other colors }, // ...other configuration };
You can register all colors in your theme just using a tiny piece of JS code to transform color objects into plain color names with the pattern {name}-{shade}
:
import colors from "@siimple/colors"; export default { colors: { ...Object.keys(colors).reduce((prev, name) => ({ ...prev, ...Object.fromEntries(Object.keys(colors[name]).map(shade => { return [`${name}-${shade}`, colors[name][shade]]; })), }), {}), // ...other colors }, // ...other configuration };
If you have the helpers module enabled, this will generate the following colors helpers:
.has-bg-blue-100 { /* ... */ } .has-bg-highlight { /* ... */ } .has-bg-blue-300 { /* ... */ } /* ... */ .has-text-blue-100 { /* ... */ } .has-text-blue-200 { /* ... */ } .has-text-blue-300 { /* ... */ } /* ... */
Designed and maintained with by @jmjuanes.
Code is licensed under MIT, documentation under Creative Commons Attribution 4.0.