没有合适的资源?快使用搜索试试~ 我知道了~
Color Thief:仅使用 Javascript 从图像中获取调色板-开源
共44个文件
js:17个
png:6个
html:5个
需积分: 12 1 下载量 179 浏览量
2021-06-24
06:05:58
上传
评论
收藏 494KB ZIP 举报
温馨提示
Color Thief 包包括多个分发文件,以支持不同的环境和构建过程。 从图像中获取主色。 颜色作为表示红色、绿色和蓝色值的三个整数的数组返回。 在浏览器中调用时,图像参数需要一个 HTML 图像元素,而不是 URL。 在 Node 中运行时,此参数需要图像的路径。 quality 是一个可选参数,必须是值 1 或更大的整数,默认为 10。该数字确定在采样下一个像素之前跳过多少像素。 我们很少需要对图像中的每个像素进行采样以获得良好的结果。 数字越大,返回值的速度就越快。 通过聚类相似的颜色从图像中获取调色板。 调色板作为包含颜色的数组返回,每种颜色本身都是一个由三个整数组成的数组。
资源推荐
资源详情
资源评论
收起资源包目录
v2.3.1.zip (44个子文件)
lokesh-color-thief-4858a20
.nvmrc 7B
package.json 2KB
cypress
test-pages
index.js 2KB
img
white.png 4KB
red.png 4KB
rainbow-vertical.png 138KB
rainbow-horizontal.png 42KB
transparent.png 3KB
black.png 4KB
index.html 2KB
screen.css 2KB
cors.html 975B
es6-module.html 892B
plugins
index.js 644B
support
index.js 670B
commands.js 841B
integration
cors_spec.js 331B
api_spec.js 2KB
module_spec.js 304B
fixtures
example.json 154B
test
node-test.js 826B
index.html 2KB
LICENSE 1KB
package-lock.json 307KB
async.html 1KB
dist
color-thief.js 3KB
color-thief.umd.js.map 2KB
color-thief.mjs 6KB
color-thief.min.js 6KB
color-thief.umd.js 6KB
src
core.js 1KB
color-thief.js 5KB
color-thief-node.js 3KB
.eslintrc.js 401B
examples
css
screen.css 2KB
img
image-1.jpg 75KB
image-2.jpg 137KB
image-3.jpg 80KB
js
demo.js 2KB
.gitignore 149B
cypress.json 3B
README.md 2KB
.editorconfig 372B
build
build.js 1KB
共 44 条
- 1
资源评论
努力中的懒癌晚期
- 粉丝: 32
- 资源: 4716
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功