JSPM

color-temp

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 85
  • Score
    100M100P100Q69868F
  • License ISC

Converts color to temperature in Kelvins, and back.

Package Exports

  • color-temp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-temp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 ]