Material Design color scheme with Mytril
Mytril integrates the full Material Design color chart, giving developers access to Google’s design standards directly in their Svelte projects. By activating the Material Design palette in your configuration, you can apply consistent and visually appealing colors across your components using simple CSS variables.
How to Enable the Material Design Palette
- Open plugins/mytril.(js|ts).
- Add this configuration to activate the Material palette:
// plugins/mytril.(js|ts)
export default {
theme: {
palette: 'material'
}
};
- Restart your environment to load the Material color variables.
Material Design color options
Once activated, you can access a wide range of colors directly in your stylesheets.
Use material colors in components by easily applying material colors to your components using CSS variables like this one:
button {
background-color: var(--red-500);
color: var(--blue-100);
}
Or use hex codes provided within the palette for more detailed control.
- red
- pink
- purple
- deep-purple
- indigo
- blue
- light-blue
- cyan
- teal
- green
- light-green
- lime
- yellow
- amber
- orange
- deep-orange
- brown
- gray
- blue-gray
red
pink
purple
deep-purple
indigo
blue
light-blue
cyan
teal
green
light-green
lime
yellow
amber
orange
deep-orange
brown
gray
blue-gray
generic
Why choose Material Design colors?
Material Design colors ensure your interface follows a consistent and standardized color scheme, making it a great choice for developers building with Material Design principles.