chroma.js - JavaScript library for all kinds of color manipulations

  •        801

Chroma.js is a tiny JavaScript library (14kB) for all kinds of color conversions and color scales. Why not dive into the interactive documentation (there's a static version, too). You can download chroma.min.js or use the hosted version on cdnjs.com.

https://github.com/gka/chroma.js

Tags
Implementation
License
Platform

   




Related Projects

chromatic-sketch - Sketch plugin for creating good-looking and perceptually uniform gradients and color scales

  •    Javascript

I came across this blog post recently. It opened my eyes to the Lab color space, and how you can use it to create perceptually uniform gradients and color scales with SASS. Chroma.js is the underlying library powering it. Check it out if you want a deeper understanding of the Lab color space and why it's good for creating color scales. Basically, it's a color space that, unlike RGB, was built to mirror the visual response of the human eye. That makes it very well suited for interpolating colors. This command will take the gradient of the selected shape and add new color stops to create a more aesthetically pleasing one.

styled-components-theme - Defines themes via flexible color selectors for use with styled-components

  •    Javascript

styled-components-theme generates selectors for colors in your styled-components theme that allows color manipulation, using the color library via calls on the selectors themselves. A selector, in this context, is defined as a function that looks like (props) => props.theme.myColor that the styled-components library accepts as a template variable.

Chroma-Hash - A sexy, secure live visualization of password field input

  •    Javascript

Password entry can be frustrating, especially with long or difficult passwords. On a webpage, secure fields obscure your input with •'s, so others can't read it. Unfortunately, neither can you—you can't tell if you got your password right until you click "Log In". Chroma-Hash displays a series of colored bars at the end of field inputs so you can instantly see if your password is right. Chroma-Hash takes an MD5 hash of your input and uses that to compute the colors in the visualization. The resulting color pattern is non-reversible, so no one could know what your password just from the colors.

Jimp - An image processing library written entirely in JavaScript for Node

  •    Javascript

An image processing library for Node written entirely in JavaScript, with zero native dependencies. It supports image manipulation methods like Blit an image, Blur an image, Various color manipulation methods, Resize, Scale and Rotate the image, Apply a dither effect to an image, Mask one image with another, Print text onto an image (watermark) and lot more.

CHChromaHashView - A classic password visualization concept, ported to iOS

  •    Objective-C

Password entry can be frustrating, especially with long or difficult passwords. Secure fields obscure your input with •'s, so others can't read it. Unfortunately, neither can you—you can't tell if you got your password right until you tap "Log In". Chroma-Hash displays a series of colored bars at the end of field inputs so you can instantly see if your password is right. Chroma-Hash takes an MD5 hash of your input and uses that to compute the colors in the visualization. The resulting color pattern is non-reversible, so no one could know what your password just from the colors.


ColorKit - Advanced color manipulation for iOS.

  •    Swift

ColorKit is your companion to work with colors on iOS. ColorKit makes it easy to find the dominant colors of an image. It returns a color palette of the most common colors on the image.

iwanthue

  •    PHP

Colors for data scientists. Generate and refine palettes of optimally distinct colors. iWantHue allows you to generate palettes of colors. It is about mastering the properties of a palette by setting a range of Hue, Chroma (unbiased saturation) and Lightness. You can generate palettes of any size or just get the generator for a javascript project. The algorithm optimizes the perceptive distance in the color subspace, ensuring an optimal readability.

pastel - A command-line tool to generate, analyze, convert and manipulate colors

  •    Rust

pastel is a command-line tool to generate, analyze, convert and manipulate colors. It supports many different color formats and color spaces like RGB (sRGB), HSL, CIELAB, CIELCh as well as ANSI 8-bit and 24-bit representations. To get more information about a specific subcommand (say mix), you can call pastel mix -h or pastel help mix.

color - :rainbow: Javascript color conversion and manipulation library

  •    Javascript

JavaScript library for immutable color conversion and manipulation with support for CSS color strings. Convert a color to a different space (hsl(), cmyk(), etc.).

PleaseJS - JavaScript Library for creating random pleasing colors and color schemes

  •    Javascript

Please.js is a polite companion that wants to help you make your projects beautiful. It uses HSV color space to create random pleasing colors as well as color schemes based on a given color. It has two core functions and a bunch of little helpers for you to use. The make_color function by default will generate and return a random hex string using the golden ratio to ensure that the color will look nice on your screen.

color-names - Massive color dictionary 🌈

  •    Javascript

A handpicked list of 17530 unique color names from various sources and thousands of user submissions. Try it yourself or read the full list. The aim of this project is to create as large a list of color names as possible. We've merged various lists, modified the names when there were duplicates with different hex values, and shifted the colors a bit when there were identical colors with different names.

color-picker - A color picker for the Atom Editor

  •    CoffeeScript

Right click and select Color Picker, or hit CMD-SHIFT-C/CTRL-ALT-C to open it. Currently reads HEX, HEXa, RGB, RGBa, HSL, HSLa, HSV, HSVa, VEC3 and VEC4 colors – and is able to convert between the formats. It also inspects Sass and LESS color variables. Just open the Color Picker with the cursor at a variable and it'll look up the definition for you. From there, you can click the definition and go directly to where it's defined.

UIColor-MLPFlatColors - A category for UIColor that adds flat UI color methods. For iOS.

  •    Objective-C

Although the UIColor class comes with built in convenience methods for producing standard colors, most of these colors are too bright and gaudy for any real use other than prototyping. So, here's a category for UIColor that adds 20 new colors that developers may actually want to use in a real app, based off the current trend of flat color schemes. It's called UIColor+MLPFlatColors. UIColor+MLPFlatColors is a category for UIColor that adds class methods to conveniently produce 20 new colors designed for flat or semi-flat interface designs. It also adds some methods for choosing a random color out of these new colors, and a macro for converting hex values to an RGB color.

css-colorguard - Keep a watchful eye on your css colors.

  •    Javascript

Every CSS project starts out with good intentions, but inevitably, one too many people eye-dropper colors into nooks and crannies that you never knew existed. CSS Colorguard helps you maintain the color set that you want, and warns you when colors you've added are too similar to ones that already exist. Naturally, it's all configurable to your tastes. Colorguard uses the CIEDE2000 algorithm to determine the similarity of each of the colors in your CSS file. This algorithm is quite complex, but is used in the broadcasting community as the best approximation of human ability to discern differences in color. RGB on the other hand, is pretty bad at representing differences in color purely based on the numerical difference of the hex values.

atom-pigments - An Atom package to display colors in project and files.

  •    CoffeeScript

Pigments will scan source files in your project directories looking for colors and will build a palette with all of them. Then for each opened file, it will use the palette to evaluate the value of a given color. The legible source paths can be defined through various settings either at the global or per project level. By default colors in every file will be highlighted, to limit the display of colors to the desired filetype only please see the Defining Where Pigments Applies below. Pigments supports out of the box most of the color transformations functions and expressions of the three biggest CSS pre-processors out there, namely LESS, Sass and Stylus. However, it doesn't mean pigments is able to parse and understand all of these languages constructs. For the moment, Pigments' aim is to support the widest range of usage, even if it implies reducing its ability to parse certain complex constructs. You can refer to the parser specs for an exhaustive list of the supported expressions.

randomColor - A tiny script for generating attractive colors

  •    Javascript

A tiny script for generating attractive random colors. See the demo for an explanation and some samples. randomColor has been ported to C#, C++, Go, Haskell, PHP, Python, Swift, Objective-C, Java, R and Rust. hue – Controls the hue of the generated color. You can pass a string representing a color name: red, orange, yellow, green, blue, purple, pink and monochrome are currently supported. If you pass a hexidecimal color string such as #00FFFF, randomColor will extract its hue value and use that to generate colors.

go-colorful - A library for playing with colors in go (golang).

  •    Go

A library for playing with colors in go (golang). I love games. I make games. I love detail and I get lost in detail. One such detail popped up during the development of Memory Which Does Not Suck, when we wanted the server to assign the players random colors. Sometimes two players got very similar colors, which bugged me. The very same evening, I want hue was the top post on HackerNews' frontpage and showed me how to Do It Right™. Last but not least, there was no library for handling color spaces available in go. Colorful does just that and implements Go's color.Color interface.

DynamicColor - Yet another extension to manipulate colors easily in Swift

  •    Swift

DynamicColor provides powerful methods to manipulate colors in an easy way in Swift. These two create a new color by adjusting the lightness of the receiver. You have to use a value between 0 and 1.

channel3 - ESP8266 Analog Broadcast Television Interface

  •    C

You may say "But nyquist says you can't transmit or receive frequencies at more than 1/2 the sample rate (40 MHz in this case). To a degree that is true. Some people thought it may be overtones, but what happens in reality something stranger happens. Everything you transmit is actually mirrored around 1/2 the sample rate (40 MHz). So, transmitting 60 MHz on an 80 MHz bitclock creates a waveform both at 60 as well as 20. This isn't perfect. Some frequencies line up to the 80 MHz well, others do not. We store a bit pattern in the "premodulated_table" array. This contains bitstreams for various signals, such as the "sync" level or "colorbust" level, or any of the visual colors. This table's length of 1408 bits per color was chosen so that when sent out one bit at a time at 80 MHz, it works out to an even multiplier of the NTCS chroma frequency of 315.0/88.0 MHz, or 3.579545455 MHz. You can calculate this by taking 1408/80MHz = 17.6us * 3.579545 MHz = 63 cycles, exactly. Conveniently, it also works out to an even multiplier of 61.25 MHz, Channel 3's luma center. 17.6us * 61.25 MHz = 1078 cycles, exactly! When you modulate arbitrary frequencies, sometimes the cycles come out very uneven.






We have large collection of open source products. Follow the tags from Tag Cloud >>


Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.