0.2.0 • Published 7 years ago
@sadbox/color-utils v0.2.0
Color Utils
A lightweight set of utility functions for working with colors.
Supported color formats: #000, #0000, #000000, #00000000, rgb(), rgba(), hsl, hsla()
Install
yarn add @sadbox/color-utils
or
npm install -S @sadbox/color-utils
Usage
import { darken } from '@sadbox/color-utils';
const dark = darken('#fff', 0.5); // #808080Available Utils
darken(color, coefficient)lighten(color, coefficient)getLuminance(color)setAlpha(color, alpha)