hex-rgb:将十六进制颜色转换为RGB

时间:2021-05-01 07:29:00
【文件属性】:
文件名称:hex-rgb:将十六进制颜色转换为RGB
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-01 07:29:00
JavaScript 十六进制rgb 将十六进制颜色转换为RGBA 安装 $ npm install hex-rgb 用法 const hexRgb = require ( 'hex-rgb' ) ; hexRgb ( '4183c4' ) ; //=> {red: 65, green: 131, blue: 196, alpha: 1} hexRgb ( '#4183c4' ) ; //=> {red: 65, green: 131, blue: 196, alpha: 1} hexRgb ( '#fff' ) ; //=> {red: 255, green: 255, blue: 255, alpha: 1} hexRgb ( '#22222299' ) ; //=> {red: 34, green: 34, blue: 34, alpha: 0.6} hexRgb ( '#0006' ) ; //=>
【文件预览】:
hex-rgb-main
----index.js(1KB)
----test.js(3KB)
----package.json(650B)
----index.test-d.ts(397B)
----readme.md(2KB)
----.github()
--------funding.yml(61B)
--------workflows()
----license(1KB)
----index.d.ts(2KB)
----.gitignore(23B)
----.npmrc(19B)
----.editorconfig(175B)
----.gitattributes(19B)

网友评论