The globals.css
Inside your apps/web/styles, you will have a globals.css with the following value:
hsl values. This allows us to change saturation, brightness without having to make changes to the hex code or mapping different levels of saturation in tailwind.config.ts file.
Convention
We use a simplebackground and foreground convention for colors. The background variable is used for the background color of the component and the foreground variable is used for the text color.
The
background suffix is omitted when the variable is used for the background color of the component.hsl(var(--primary)) and the foreground color will be hsl(var(--primary-foreground)).
Adding new colors
To add new colors, you need to add them to yourglobals.css and to your packages/tailwind-config/tailwind.config.ts file.
apps/web/globals.css
packages/tailwind-config/tailwind.config.ts
warning utility class in your components: