@sadbox/color-utils

0.2.0 • Public • Published

Version License Dependencies Bundle Size Build Status

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); // #808080

Available Utils

  • darken(color, coefficient)
  • lighten(color, coefficient)
  • getLuminance(color)
  • setAlpha(color, alpha)

Readme

Keywords

none

Package Sidebar

Install

npm i @sadbox/color-utils

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

26.5 kB

Total Files

9

Last publish

Collaborators

  • strayiker