Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including colorizejs with all npm packages installed. Try it out:

var colorizejs = require("colorizejs")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

colorizejs v1.1.1

A jQuery plugin to colorize a data element according to its value

DevOps By

Build Status PDD status License NPM version

It's a simple jQuery plugin to colorize data elements according to its value:

$('#foo').colorizejs({ 500: 'green', 0: 'red' });

If the value of #foo is larger than 500, its color will be set to green, if larger than zero, it will be set to red, otherwise it will not be touched.

You can also use classes instead of colors, but prepending them with a dot:

$('#foo').colorizejs({ 500: '.green', 0: '.red' });

The easiest way is to just include it in your HTML from the RawGit CDN:

<!DOCTYPE html>
    <link rel="stylesheet" href=""/>

Download the latest release.

You can also install it with npm:

$ npm install colorizejs

How to Contribute

First, make sure you can build it locally:

$ npm install gulp
$ gulp

The build has to be clean. If it's not, submit an issue.

Then, make your changes, make sure the build is still clean, and submit a pull request.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free