0.1.1 • Published 3 years ago
dls-color-palette v0.1.1
dls-color-palette
To generate a color palette out of the given base color.
Installation
npm i --save-dev dls-color-paletteUsage
Get color shade
function getShade(color: string, level: number): string
Params:
color: string- the brand color in hex format.level: number- level of the color shade. Valid range: 1, 10
Return Value:
- Color of the given level in hex format.
import { getShade } from 'dls-color-palette'
const shade = getShade('#0052cc', 2) // → #e0edffGet contextual color according to the given brand color
function getContextual(color: string, type: string): string
Params:
color: string- the brand color in hex format.type: 'info' | 'success' | 'warning' | 'error'- type of the contextual color.
Return Value:
- Contextual color in hex format.
import { getContextual } from 'dls-color-palette'
const contextual = getContextual('#0052cc', 'success') // → #00bf5c0.1.1
3 years ago
0.1.0
3 years ago
0.0.1-alpha.3
5 years ago
0.0.1-alpha.2
5 years ago
0.0.1-alpha.1
5 years ago
0.0.1-alpha.0
5 years ago