Select an image in the asset field and automatically get the image's dominant color in a color field.
This plugin requires Craft CMS 3.3.0 or later.
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.
{{ fieldName.asset.getUrl() }}
{{ fieldName.color }}
{{ fieldName.brightness }}