Collection of color manipulation functions


621.0.17 years ago7 years agoMinified + gzip package size for color-manipulate in KB


color-manipulate Build Status Code Climate

A collection of color manipulation functions.

$ npm install color-manipulate

var mix = require('color-manipulate/mix');
mix(colorA, colorB, .5);


  • lighten(color, ratio) — increase color lightness by ratio.
  • draken(color, ratio) — decrease color lightness by ratio.
  • saturate(color, ratio) — saturate color by ratio.
  • desaturate(color, ratio) — decrease saturation by ratio.
  • whiten(color, ratio) (aka tint) — mix to white.
  • blacken(color, ratio) (aka shade) — mix to black.
  • grayscale(color, ratio) — convert color to gray.
  • fadeout(color, ratio) (aka clearer, transparentize) — increase transparency.
  • fadein(color, ratio) (aka opaquer, opacify) — decrease transparency.
  • spin(color, degrees) (aka rotate) — rotate hue by degrees.
  • invert(color, ratio) (aka negate) — invert color.
  • mix(color1, color2, ratio) (aka blend) — mix second color to the first color.

Supported color libs


  • color-measure — a collection of color measures.
  • color-blend — a collection of color blending functions.
  • color-space — a collection of color spaces and conversions between them.
  • color — color class, exposing these libs as an API.


Suggest color library, manipulation or tell about the library using color-manipulate.


If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from