Skip to content

Santinell/color-temp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

color-temp

Converts color to temperature in Kelvins, and back.

INSTALL

npm install color-temp

EXAMPLES

Converting rgb to temperature:

var conv = require('color-temp');
var temp = conv.rgb2temp([255, 255, 255]); // White color
console.log(temp+"K"); // 6504K

Converting temperature to rgb:

var conv = require('color-temp');
var rgb = conv.temp2rgb(1000);
console.log(rgb); // ~[ 255, 67, 0 ]

About

Converts color to temperature in Kelvins, and back.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published