GithubHelp home page GithubHelp logo

fabe / cielab.io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ucarion/cielab.io

0.0 1.0 0.0 13.78 MB

CIELab.io is a color tool based on human perception

Home Page: https://cielab.io

TypeScript 98.86% JavaScript 1.14%

cielab.io's Introduction

A recorded demo of CIELab.io

A video demo of CIELab.io. You can see the real thing live here:

https://cielab.io

CIELab.io is a color tool based on human perception. CIELab.io lets you work with colors based on human perception, instead of based on how screens display them.

With CIELab.io, you can:

  • Explore a selected set of color palettes from various brands and design systems, and see how they look in CIELab.
  • Build your own color palette, visualize it in CIELab, and export it into code.

This project is deeply indebted to related work from Stripe, blogged about in Designing accessible color systems by Daryl Koopersmith and Wilson Miner. CIELab.io is inspired by the screenshots in that blog post.

What is "CIELab"?

If you're a web developer or designer, you're probably familiar with RGB. In the context of the web, "RGB" refers to sRGB ("Standard Red-Green-Blue"). sRGB is a color space, an arragement of colors. sRGB arranges colors based on how much red, green, and blue light combined is needed to display a given color.

For designers, sRGB has a big problem: it's optimized for monitors and printers, and human perception does not work like those machines. In particular, "distance" in sRGB does not correspond to what humans think of distance between colors. Humans are more sensitive to certain colors than others, and sRGB is not designed to fully account for this.

For example, here are two colors which in RGB are the same distance from white:

Colors with equal sRGB distance from white

For most people, these two colors do not appear to be equally "bright", despite being equidistant (in sRGB space) from white. The color on the left seems brighter.

CIELab (also spelled CIELAB, CIE La*b*, or Lab) is a color space based on human perception. Instead of using Red, Green, and Blue as the "axes", CIELab uses Lightness (Black/White), "a" (Green/Red), and "b" (Blue/Yellow). Unlike in sRGB, in CIELAB distance is meaingful.

For example, here's that same example as before, but with the color on the right modified so that its "Lightness" dimension equals the "Lightness" on the left:

Colors with equal LAB distance from white

For most people, these colors now seem to be equally visually bright. This is an important feature for designers, because it means that if two buttons with these colors were side by side, they would have equal visual weight.

What are "Chroma" and "Hue"?

When you use CIELab.io, you'll run into the terms "Chroma" and "Hue". These are the radial-coordinate counterpart to the Cartesian-coordinate "a" and "b" in CIELab. Chroma ("c") and Hue ("h"), together with Luminance ("L") from CIELab, construct the CIELch space.

The previous section explains why CIELab is, for designers, a more useful version of RGB. Think of CIELch as being like the familiar HSL (Hue-Saturation-Lightness), but for CIELab instead of RGB. You preserve the human-centric nature of CIELab, but also enjoy HSL concepts like the color wheel.

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.