chroma.js is a small-ish zero-dependency JavaScript library (13.5kB) for all kinds of color conversions and color scales. Read colors from a wide range of formats, analyze and manipulate colors, convert colors into wide range of formats, linear and bezier interpolation in different color spaces. Aside from that, chroma.js can also help you generate nice colors using various methods, for instance to be used in color palette for maps or data visualization. The first step is to get your color into chroma.js. That's what the generic constructor chroma() does. This function attempts to guess the format of the input color for you. For instance, it will recognize any named color from the W3CX11 specification. If there's no matching named color, chroma.js checks for a hexadecimal string. It ignores case, the # sign is optional, and it can recognize the shorter three letter format as well. So, any of these are valid hexadecimal representations: #ff3399, FF3399, #f39, etc.

Features

  • Get and set the color opacity using color.alpha
  • Once loaded, chroma.js can change colors
  • Chroma.js allows you to output colors in various color spaces and formats
  • A color scale, created with chroma.scale, is a function that maps numeric values to a color palette
  • You can change the input domain to match your specific use case
  • Blend two colors using RGB channel-wise blend functions

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow Chroma.js

Chroma.js Web Site

You Might Also Like
AI-powered conversation intelligence software Icon
AI-powered conversation intelligence software

Unlock call analytics that provide actionable insights with our call tracking software, empowering you to identify what's working and what's not.

Every customer interaction is vital to your business success and revenue growth. With Jiminny’s AI-powered conversation intelligence software, we take recording, capturing, and meticulous analysis of call recordings to the next level. Unlock call analytics that provide actionable insights with our call tracking software, empowering you to identify what's working and what's not. Seamlessly support your biggest objectives across the entire business landscape with our innovative call tracking system.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Chroma.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript User Interface (UI) Software

Registered

2021-07-08