hfg / imagecolor
Extracts the dominant color of an image into a color field.
Installs: 51
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 1
Type:craft-plugin
Requires
- aelvan/imager: ^2.3
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2023-03-03 23:24:39 UTC
README
Select an image in the asset field and automatically get the image's dominant color in a color field.
Requirements
This plugin requires Craft CMS 3.3.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require hfg/imagecolor
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for imagecolor.
Usage
{{ fieldName.asset.getUrl() }} {{ fieldName.color }} {{ fieldName.brightness }}