Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

csb-hex

Richienb21MIT1.0.0TypeScript support: included

Convert a Scratch CSB colour to HEX.

scratch, hex, csb, hsv, colour

readme

csb-hex Travis CI Build Status

Convert a Scratch CSB colour to HEX.

NPM Badge

Install

npm install csb-hex

Usage

const csbHex = require("csb-hex");

csbHex([0, 0, 100]);
//=> "FFFFFF"

csbHex([0, 0, 0]);
//=> "000000"

csbHex([14, 100, 100]);
//=> "FFD500"

API

csbHex(input)

input

Type: array of 3 numbers

The CSB to convert.

  • hex-csb - Convert a HEX colour to Scratch CSB