color-temp:将颜色转换为开尔文温度,然后返回

时间:2021-06-27 23:15:50
【文件属性】:
文件名称:color-temp:将颜色转换为开尔文温度,然后返回
文件大小:2KB
文件格式:ZIP
更新时间:2021-06-27 23:15:50
JavaScript 色温 将颜色转换为开尔文温度,然后返回。 安装 npm install color-temp 例子 将 rgb 转换为温度: var conv = require ( 'color-temp' ) ; var temp = conv . rgb2temp ( [ 255 , 255 , 255 ] ) ; // White color console . log ( temp + "K" ) ; // 6504K 将温度转换为 rgb: var conv = require ( 'color-temp' ) ; var rgb = conv . temp2rgb ( 1000 ) ; console . log ( rgb ) ; // ~[ 255, 67, 0 ]
【文件预览】:
color-temp-master
----package.json(586B)
----index.js(1KB)
----README.md(515B)

网友评论