born05/craft-colorextractor
最新稳定版本:3.0.0
Composer 安装命令:
composer require born05/craft-colorextractor
包简介
Extract colors from image assets in Craft CMS. Requires a field named `imageColor` on all assets of kind image (can be color or plaintext)
README 文档
README
Extract colors from image assets in Craft 3. The Craft 2 plugin is moved to another branch.
Inner working
By using the imageColor field on each asset, it doesn't require extra database queries when showing colors. On install it creates a task to extract the color for every image.
Requirements
- A field named
imageColoron all assets of kind image (can be color or plaintext) - Craft 3 (we test on the latest release of Craft 3)
- PHP 7.1 at least
Example usage
Use the colorExtractor twig filter to retrieve the image's color from templates.
<div style="background-color: {{ entry.images[0]|colorExtractor }};"></div>
From command:
craft color-extractor/default
Credits
Based upon craft-image-color plugin by familiar-studio.
统计信息
- 总下载量: 5.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-10