Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.02 KB

README.md

File metadata and controls

27 lines (21 loc) · 1.02 KB

Hue color converter

npm version Build Status semantic-release Greenkeeper badge

Convert RGB values to XY values.

Getting started

Install using npm:

npm install --save @q42philips/hue-color-converter

Basic usage:

var converter = require('@q42philips/hue-color-converter');

// Using default color points
console.log(converter.calculateXY(255, 0, 0));
// prints [ 0.7006, 0.2993 ]

// Calculate for a specific bulb model
console.log(converter.calculateXY(255, 0, 0, 'LCT001');
// prints [ 0.7, 0.2986 ]