All Projects → gka → Chroma.js

gka / Chroma.js

Licence: other
JavaScript library for all kinds of color manipulations

Programming Languages

javascript
184084 projects - #8 most used programming language
coffeescript
4710 projects
HTML
75241 projects

Projects that are alternatives of or similar to Chroma.js

Ditherjs
A javascript library which dithers an <img> using a fixed palette
Stars: ✭ 76 (-99.09%)
Mutual labels:  colors, javascript-library
Ac Colors
ac-colors is a reactive JavaScript color library that can freely convert between RGB, HSL, HEX, XYZ, LAB, LCHab, LUV, and LCHuv, as well as handle random color generation and contrast ratio calculation.
Stars: ✭ 243 (-97.09%)
Mutual labels:  colors, javascript-library
anypalette.js
🎨 Read/write all color palette file formats ❤🧡💛💚💙💜
Stars: ✭ 41 (-99.51%)
Mutual labels:  colors, javascript-library
React Equalizer
Pure React Match Height Component
Stars: ✭ 32 (-99.62%)
Mutual labels:  javascript-library
Leonardo
Generate colors based on a desired contrast ratio
Stars: ✭ 973 (-88.37%)
Mutual labels:  colors
React Native Heic Converter
Convert your HEIC files with React Native
Stars: ✭ 43 (-99.49%)
Mutual labels:  javascript-library
Adder
Executing untrusted code with ease.
Stars: ✭ 45 (-99.46%)
Mutual labels:  javascript-library
Pki.js
PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
Stars: ✭ 960 (-88.52%)
Mutual labels:  javascript-library
Filepond Boilerplate Php
🔥 A FilePond PHP project starter kit
Stars: ✭ 45 (-99.46%)
Mutual labels:  javascript-library
Redash
Tiny functional programming suite for JavaScript.
Stars: ✭ 40 (-99.52%)
Mutual labels:  javascript-library
Minisauras
An open-source CI/CD automation tool based on GitHub Actions that pulls all the JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.
Stars: ✭ 40 (-99.52%)
Mutual labels:  javascript-library
Vue Beautiful Chat
A simple and beautiful Vue chat component backend agnostic, fully customisable and extendable.
Stars: ✭ 979 (-88.3%)
Mutual labels:  colors
Vue Prism
Simple Vue.js Syntax highlighting with Prism.js
Stars: ✭ 43 (-99.49%)
Mutual labels:  javascript-library
Byte Size
Isomorphic function to convert a bytes value (e.g. 3456) to a human-readable string ('3.5 kB')
Stars: ✭ 33 (-99.61%)
Mutual labels:  javascript-library
Simpletones.js
The goal of simpleTones.js is to provide every JavaScript developer with a lightweight solution for creating custom sounds in their web applications. This documentation has been written in hopes that the least experienced developer can read, understand and go on to do great things. You can check out several examples at this link:
Stars: ✭ 45 (-99.46%)
Mutual labels:  javascript-library
Hsluv
Human-friendly HSL, reference implementation
Stars: ✭ 959 (-88.53%)
Mutual labels:  colors
React Marker
🖍️ Highlight keywords and add colors to your text.
Stars: ✭ 45 (-99.46%)
Mutual labels:  colors
Svg World Map
🗺 A JavaScript library to easily integrate one or more SVG world maps with all nations (countries) and second-level political subdivisions (countries, provinces, states).
Stars: ✭ 38 (-99.55%)
Mutual labels:  javascript-library
Loreley
Simple and extensible colorizer for programs' output
Stars: ✭ 37 (-99.56%)
Mutual labels:  colors
Color.js
Extract colors from an image (0.75 KB) 🎨
Stars: ✭ 42 (-99.5%)
Mutual labels:  colors

Chroma.js

Chroma.js is a tiny small-ish zero-dependency JavaScript library (13.5kB) for all kinds of color conversions and color scales.

Build Status

Usage

Install from npm

npm install chroma-js

Import package into project

import chroma from "chroma-js";

Initiate and manipulate colors:

chroma('#D4F880').darken().hex();  // #9BC04B

Working with color scales is easy, too:

scale = chroma.scale(['white', 'red']);
scale(0.5).hex(); // #FF7F7F

Lab/Lch interpolation looks better than RGB

chroma.scale(['white', 'red']).mode('lab');

Custom domains! Quantiles! Color Brewer!!

chroma.scale('RdYlBu').domain(myValues, 7, 'quantiles');

And why not use logarithmic color scales once in your life?

chroma.scale(['lightyellow', 'navy']).domain([1, 100000], 7, 'log');

Like it?

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.

You can use it in node.js, too!

npm install chroma-js

Or you can use it in SASS using chromatic-sass!

Build instructions

First clone the repository and install the dev dependencies:

git clone [email protected]:gka/chroma.js.git
cd chroma.js
npm install

Then compile the coffee-script source files to the build files:

npm run build

Don't forget to tests your changes! You will probably also want to add new test to the /test folder in case you added a feature.

npm test

And to update the documentation just run

npm run docs

To preview the docs locally you can use

npm run docs-preview

Similar Libraries / Prior Art

Author

Chroma.js is written by Gregor Aisch.

License

Released under BSD license. Versions prior to 0.4 were released under GPL.

Further reading

FAQ

There have been no commits in X weeks. Is chroma.js dead?

No! It's just that the author of this library has other things to do than devoting every week of his life to making cosmetic changes to a piece of software that is working just fine as it is, just so that people like you don't feel like it's abandoned and left alone in this world to die. Bugs will be fixed. Some new things will come at some point. Patience.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].