Coder Social home page Coder Social logo

abnmt / hsluv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hsluv/hsluv

0.0 1.0 0.0 7.1 MB

Human-friendly HSL, reference implementation

Home Page: https://www.hsluv.org/

License: MIT License

JavaScript 22.60% Haxe 29.61% Nix 12.44% HTML 26.99% CSS 2.65% Shell 4.41% Dockerfile 1.29%

hsluv's Introduction

Build Status NPM package

HSLuv - Human-friendly HSL

Explanation, demo, ports etc.

The reference implementation is written in Haxe.

Build system

HSLuv uses Nix package manager. If you want to build without Nix, see default.nix for dependencies and command line instructions.

Linux, Windows 10 (WSL), macOS 10.14 and earlier:

  • Install Nix
  • Use: ./run.sh <COMMAND> <TARGET>

Linux, macOS:

  • Install Docker
  • Use: HSLUV_RUNTIME=docker ./run.sh <COMMAND> <TARGET>

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

./run.sh build maximaOutput

To run full test suite:

./run.sh build test

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

./run.sh build nodePackageDist
./run.sh build browserDist

To build website:

./run.sh build website

To build website and start localhost server:

./run.sh run server

Testing

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

./run.sh build 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 ]
  },
  ...
}

Deploying

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

./run.sh run publishPypi
./run.sh run publishNpmJs
./run.sh run publishNpmSass
./run.sh run publishLua
./run.sh run publishWebsite
./run.sh run publishRuby
./run.sh run publishNuget
./scripts/publish-maven.sh

Versioning

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

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.