Demo • Key Features • Installation • Usage • Examples
Interactive demo generating tailwindcss palettes
npm i @bobthered/tailwindcss-palette-generator
The tailwindcssPaletteGenerator()
function receives only one parameter.
Option Type | Type |
---|---|
String |
string |
Array of Strings |
string[] |
Object |
{ |
// tailwind.config.js
import { tailwindcssPaletteGenerator } from '@bobthered/tailwindcssPaletteGenerator';
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
colors: tailwindcssPaletteGenerator('#FF0040')
}
},
plugins: []
};
// tailwind.config.js
import { tailwindcssPaletteGenerator } from '@bobthered/tailwindcssPaletteGenerator';
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
colors: tailwindcssPaletteGenerator(['#FF0040', '#FFBB00'])
}
},
plugins: []
};
// tailwind.config.js
import { tailwindcssPaletteGenerator } from '@bobthered/tailwindcssPaletteGenerator';
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
colors: tailwindcssPaletteGenerator({
colors: ['#FF0040'],
shades: [
{ name: 'light', lightness: 95 },
{ name: 'normal', lightness: 46 },
{ name: 'dark', lightness: 7 }
]
})
}
},
plugins: []
};
// tailwind.config.js
import { tailwindcssPaletteGenerator } from '@bobthered/tailwindcssPaletteGenerator';
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
colors: tailwindcssPaletteGenerator({
colors: ['#FF0040', '#FFBB00'],
names: ['red', 'yellow']
})
}
},
plugins: []
};