Coder Social home page Coder Social logo

waldyrious / color-space Goto Github PK

View Code? Open in Web Editor NEW

This project forked from colorjs/color-space

0.0 3.0 0.0 412 KB

Math & data behind color spaces and color conversions.

Home Page: http://scijs.net/color-space

License: The Unlicense

JavaScript 93.54% HTML 6.46%

color-space's Introduction

Color-space Build Status stable

Conversions and data for color spaces. Demo.

Usage

npm install color-space

var space = require('color-space');

//convert lab to lch
var result = space.lab.lch([80,50,60]);

You can require a separate space to reduce size significantly:

var rgb = require('color-space/rgb');
var hsl = require('color-space/hsl');

//convert rgb to hsl
rgb.hsl([200,230,100]);

API

<fromSpace>.<toSpace>(array);
<space>.name //space name
<space>.min //channel minimums
<space>.max //channel maximums
<space>.channel //channel names
<space>.alias //alias space names

Spaces

Contribute

Please fork, add color space with basic conversions to/from XYZ or RGB and tests. The goal of project is to provide the most complete set of color spaces with maximally minimal uniform API.

Credits

Thanks to all the color scientists, who devoted their lives to color research and delivered their knowledge to us, for now we can trust them and use their formulas and their code.

Related

  • colormap — collection of colormaps to map colors of images/data. A replacement for visualising spaces like cubehelix.
  • color-spectrum — convert spectrum to a color.
  • color-interpolate — interpolate between color values.
  • color-tool — color picker based on color-space.

Similar projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.