Tailwind CSS color scheme with Mytril
Mytril offers seamless integration with the Tailwind CSS color palette, allowing developers to harness the power of Tailwind’s extensive color options directly in their Svelte projects. With easy setup and a wide range of utility classes, you can ensure your components are responsive and visually cohesive.
How to enable the tailwind palette
- Open plugins/mytril.(js|ts).
- Add this configuration to activate the Tailwind palette:
// plugins/mytril.(js|ts)
export default createMytril({
theme: {
palette: 'tailwind'
}
}); - Restart your environment to load the Tailwind color variables.
Tailwind Color Options
Once activated, you can use Tailwind’s extensive color options.
Apply Tailwind colors using CSS variables for streamlined styling:
button {
background-color: var(--stone-4);
color: var(--slate-1);
} - slate
- gray
- zinc
- neutral
- stone
- red
- pink
- rose
- fuchsia
- purple
- grape
- indigo
- blue
- sky
- cyan
- teal
- emerald
- green
- lime
- yellow
- amber
- orange
slate
gray
zinc
neutral
stone
red
pink
rose
fuchsia
purple
grape
indigo
blue
sky
cyan
teal
emerald
green
lime
yellow
amber
orange
generic
Why use Tailwind colors?
Tailwind’s utility-first approach gives you more flexibility to apply responsive colors. It’s perfect for developers who want full control over their UI design without relying on predefined themes.