StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/color-normalize
Angelos Chatzimparmpas f521a3509d paper-version 5 years ago
..
.eslintrc.json paper-version 5 years ago
.travis.yml paper-version 5 years ago
index.js paper-version 5 years ago
package.json paper-version 5 years ago
readme.md paper-version 5 years ago
test.js paper-version 5 years ago

readme.md

color-normalize Build Status Greenkeeper badge

Convert any color argument (string, color, number, object etc.) to an array with channels data of desired output format.

Usage

npm install color-normalize

const rgba = require('color-normalize')

rgba('red') // [1, 0, 0, 1]
rgba('rgb(80, 120, 160)', 'uint8') // Uint8Array<[80, 120, 160, 255]>
rgba('rgba(255, 255, 255, .5)', 'float64') // Float64Array<[1, 1, 1, .5]>
rgba('hsla(109, 50%, 50%, .75)', 'uint8') // Uint8Array<[87, 191, 64, 191]>
rgba(new Float32Array([0, 0.25, 0, 1]), 'uint8_clamped') // Uint8ClampedArray<[0, 64, 0, 255]>
rgba(new Uint8Array([0, 72, 0, 255]), 'array') // [0, 0.2823529411764706, 0, 1]

// ambivalent input
rgba([0,0,0]) // [0,0,0]
rgba([.5,.5,.5]) // [.5,.5,.5]
rgba([1,1,1]) // [1,1,1]
rgba([127,127,127]) // [.5,.5,.5]
rgba([255,255,255]) // [1,1,1]

Output format can be any dtype: uint8, uint8_clamped, array, float32, float64 etc. By default it converts to array with 0..1 range values.

License

(c) 2017 Dima Yv. MIT License