Skip to content

sgarza/Chameleon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chameleon Javascript Color Manipulation Library

A Simple yet powerful color manipulation lib written in javascript based on the color theory http://www.tigercolor.com/color-lab/color-theory/color-theory-intro.htm

Dependencies

Neon Javascript Class DSL http://github.com/azendal/neon

Browser support

All Major Browsers

Examples


  // Make an instance of Chameleon
  var color = new Chameleon('#00FF00');

  color.getHue(); // returns 120

  color.setSaturation(20); // modifies the saturation value

  color.rotateBy(15); // shift the hue value the given degrees

  // Test if a Color is Legible over some other Background Color
  var text       = new Chameleon('#00FF00');
  var background = new Chameleon('#FF0000');

  text.isLegible(background); // returns true

  text.getLegibles(background) // returns an array of "STRING" Objects with modified saturation and values that are readable on the given background color

Help and Contact

You are very welcome to contribute. Just fork the git repository and create a new issue, send a pull request or contact me personally.

Contributors

Sergio de la Garza (Lead Developer)
-sergio.delagarza [at] gmail
-@sgarza (Twitter)

Fernando Trasviña (Core Member Lead)
-trasvina [at] gmail
-@azendal (Twitter)

About

Javascript Library to handle Color calculations

Resources

Stars

Watchers

Forks

Packages

No packages published