Human-friendly HSL, reference implementation (revision 4)
Haxe HTML JavaScript Nix Shell CSS
Clone or download

Build Status NPM package

HSLuv - Human-friendly HSL

Explanation, demo, ports etc.

The reference implementation is written in Haxe.


Requirements: Nix package manage. If you want to build without Nix, see default.nix for dependencies and command line instructions.

The necessary mathematical equations are solved in Maxima. See /math directory for the equations and run the following to verify the solutions:

nix-build -A maximaOutput

To run full test suite:

nix-build -A test

To build JavaScript distributions (Node.js and browser):

nix-build -A nodePackageDist
nix-build -A browserDist

To build website:

nix-build -A website

To build website and start localhost server:

./ server


The snapshot file is stored for regression testing. If a backwards-incompatible change is made, a new snapshot file can be generated as follows:

nix-build -A snapshotJson

The format of the file is as follows:

  "#000000": {
    rgb: [ 0, 0, 0 ],
    xyz: [ 0, 0, 0 ],
    luv: [ 0, 0, 0 ],
    lch: [ 0, 0, 0 ],
    hsluv: [ 0, 0, 0 ],
    hpluv: [ 0, 0, 0 ]


For publishing packages and website you will need access to our shared credentials.

./ publishPypi
./ publishNpmJs
./ publishNpmSass
./ publishLua
./ publishWebsite
./ publishRuby
./ publishNuget


Following semantic versioning, the major version must be incremented whenever the color math changes. These changes can be tested for with snapshot files.