Javascript color manipulation

Recently I needed to write some code which involved matching any given colour against a custom palette of colours. I found it hard to find any decent javascript out there... So I wrote my own.

Introducing: Color Utils

Main features:

  • Convert any colour format to any other colour format
  • Match colours against a custom palette
  • Match colours against a websafe palette
  • Increase/decrease Hue, Saturation and Brightness of a colour
  • Find different colour harmonies for a color
  • Fade from one colour to another
  • Easy to use
  • No dependancies such as prototype or jQuery
  • Small file size. Just 11kb!

Color Utils

Enjoy! http://www.madebypi.co.uk/labs/colorutils/