Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chameleon-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chameleon-js

Javascript Library to handle Color calculations

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

h1. 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

h3. Dependencies

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

h3. Browser support

All Major Browsers

h3. 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

h3. 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.

h3. Contributors

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

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

Keywords

FAQs

Package last updated on 06 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc