Skip to content

Q42Philips/hue-color-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ]