TinyColor

Fast, small color manipulation and conversion for JavaScript

About

TinyColor is a library for parsing color input and outputting colors as different formats. Input is meant to be as permissive as possible.

Usage

API Docs - Readme

Demo

red - 0f0 - rgb 255 128 128 - hsl(0, 100%, 50%) - hsv 0, 100%, 50%



        
Lighten
Darken
Saturate
Desaturate
Greyscale
Brighten
Most Readable
Triad
Tetrad
Monochromatic
Analogous
Split Complements

Credit

Developed by Brian Grinstead. Big thanks to the following places:

  • less.js for some of the modification functions
  • jQuery xColor for some of the combination functions
  • w3.org for the color list and parsing rules
  • mjijackson.com for the first stab at RGB / HSL / HSV converters