#Colors

import { colorsSystem } from "@poodle/system";

The colors system help us quickly apply a color code in a predefined list

const theme = {
colors: {
sets: {
primary: "red",
secondary: "yellow",
accent: {
light: "#ccc",
base: "#d5d5d5"
}
},
modes: {
dark: {
primary: "cyan",
},
},
},
};
const listSystem = compose(colorsSystem, spacingSystem);
export const system = createSystem(listSystem);
const styles = system({
theme,
bg: "primary",
color: "accent.light",
fill: "accent"
});
// Styles result
// { background: "red" },
// { color: "#ccc" },
// { fill: "#d5d5d5" },
const styles2 = system({
theme: {
...theme,
mode: "dark"
},
bg: "primary",
});
// Styles result
// { background: "cyan" },
PropTypeDescription
backgroundResponsiveProp<CSS.Property.Background>The CSS background property
backgroundColorResponsiveProp<CSS.Property.BackgroundColor>The CSS background-color property
bgResponsiveProp<CSS.Property.Background>The CSS background property
bgcResponsiveProp<CSS.Property.BackgroundColor>The CSS background-color property
colorResponsiveProp<string \| CSS.Property.Color>The CSS color property
fillResponsiveProp<CSS.Property.Fill>The CSS fill property
opacityResponsiveProp<CSS.Property.Fill>The CSS opacity property