Colorizejs banner
yegor256 yegor256

Colorizejs

Data community

Description

A jQuery plugin for conditional colorization of data elements

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

A jQuery Plugin for Conditional Colorization

[![DevOps By Rultor.com](https://www.rultor.com/b/yegor256/colorizejs)](https://www.rultor.com/p/yegor256/colorizejs)

[![gulp](https://github.com/yegor256/colorizejs/actions/workflows/gulp.yml/badge.svg)](https://github.com/yegor256/colorizejs/actions/workflows/gulp.yml) [![PDD status](https://www.0pdd.com/svg?name=yegor256/colorizejs)](https://www.0pdd.com/p?name=yegor256/colorizejs) [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/colorizejs/blob/master/LICENSE.txt) [![NPM version](https://badge.fury.io/js/colorizejs.svg)](https://badge.fury.io/js/colorizejs)

The current version of the library is `1.2.0`, the full list is on the [releases](https://github.com/yegor256/colorizejs/releases) page.

It's a simple [jQuery](https://jquery.com/) plugin to colorize data elements according to their values:

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

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

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

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

The easiest way is to just include it in your HTML from the [jsDelivr CDN](https://www.jsdelivr.com/):



  
    
  

Otherwise, you can download the [latest release](https://github.com/yegor256/colorizejs/releases).

You can also install it with npm:

npm install colorizejs

Example

A minimal `example.html` file is included to demonstrate how ColorizeJS colours numeric values based on defined rules.

T