get-svg-colors:从SVG文件中提取笔触和填充颜色

时间:2021-05-06 04:27:54
【文件属性】:
文件名称:get-svg-colors:从SVG文件中提取笔触和填充颜色
文件大小:69KB
文件格式:ZIP
更新时间:2021-05-06 04:27:54
JavaScript 获取svg颜色 从SVG文件中提取笔触和填充颜色。 设计用于节点,而不是浏览器。 安装 npm install get-svg-colors --save 用法 const getColors = require ( "get-svg-colors" ) // Give it an SVG filename const colors = getColors ( __dirname + '/australia.svg' ) // Or an SVG string const colors = getColors ( '<svg...>' ) // You'll get back an object with two keys: `fills` and `strokes` // `fills` is an array of chroma-js objects colors . fills .
【文件预览】:
get-svg-colors-master
----.travis.yml(218B)
----index.js(2KB)
----package.json(654B)
----test()
--------index.js(2KB)
--------fixtures()
----example.js(738B)
----README.md(2KB)

网友评论