Skip to content

AmirAsghary/materialifier

Repository files navigation

codecov npm bundle size

Materialifier

Generates color palettes based on the Material design color system

Usage example:

import { 
    generateAccentPalette, 
    generateDarkPalette, 
    generateLightPalette,
    RGBColor
} from 'materialifier';

// You can use colors in hex form as the base color for the palette
const colors1 = generateAccentPalette('#ce1b1b');

// ... or pass in a color in RGB form:
const colors2 = generateAccentPalette(new RGBColor(0.4, 0.6, 0.2));

// An array of 10 colors will be returned, from color-50 to color-900

References: Material Color Tool

License

Released under the MIT License