Skip to content

master-co/colors

Repository files navigation


Master CSS

A crafted color system for beautiful user interfaces

NPM Version NPM package ( download / month ) JSDelivr hits (npm scoped) Discord online Follow @mastercorg Github release actions

Master Colors v1 is the predecessor to the color palette of Master CSS v1.

Documentation

Visit v1.css.master.co/docs/colors to preview the all colors.

Getting Started

Install the Master CSS via package managers:

npm install @master/colors@1

Import the colors:

import colors from '@master/colors'

The structure of the colors object in v1 uses hex color codes without the # prefix as values, and the color scale is 2~98:

{
    red {
        2: '0b0000',
        4: '150000',
        ...,
        98: 'fffcfc',
        '': 'd11a1e'
    },
    gray: {
        ...
    },
    ...
}

The exported fillColorScale(colors) helps you fill 2~98 with custom colors:

import fillColorScale from '@master/colors/fill-color-scale'

const customColors = fillColorScale({
    10: 'ff3366',
    20: 'ff4488',
    ...
    90: 'ff3311'
})

Want to upgrade to Master CSS v2? Check out the guide Migrating from Master CSS 1.0.

Community

The Master community can be found here:

Our 《 Code of Conduct 》 applies to all Master community channels.

Contributing

Please see our CONTRIBUTING for workflow.