Title: Dominant Color
Author: Liam Gladdy
Published: <strong>སྤྱི་ཟླ་བདུན་པ། 21, 2015</strong>
Last modified: སྤྱི་ཟླ་བཞི་པ། 16, 2024

---

Search plugins

![](https://ps.w.org/dominant-color/assets/banner-772x250.png?rev=1360704)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/dominant-color/assets/icon.svg?rev=1360664)

# Dominant Color

 By [Liam Gladdy](https://profiles.wordpress.org/lgladdy/)

[Download](https://downloads.wordpress.org/plugin/dominant-color.2.2.0.zip)

 * [Details](https://dzo.wordpress.org/plugins/dominant-color/#description)
 * [Reviews](https://dzo.wordpress.org/plugins/dominant-color/#reviews)
 *  [Installation](https://dzo.wordpress.org/plugins/dominant-color/#installation)
 * [Development](https://dzo.wordpress.org/plugins/dominant-color/#developers)

 [Support](https://wordpress.org/support/plugin/dominant-color/)

## Description

A WordPress plugin to automatically save the dominant color and a color palette 
for an attachment image into post_meta.

## Screenshots

 * [[
 * Shows the plugin in use on hellobrstl.com
 * [[
 * Shows the plugin in use on hellobrstl.com
 * [[
 * Shows the plugin in use on hellobrstl.com

## Installation

The dominant color and color palette is automatically saved on upload and edit to
post meta.

You need to then use get_post_meta to retrieve the “dominant_color_hex” or “dominant_color_rgb”
meta key. hex returns a string, including the #, rgb returns an array with key 0
as red, 1 as green, and 2 as blue.

Alternatively, you can use the meta keys “color_palette_rgb” and “color_palette_hex”
to get an array of 8 colors that feature prominently in the image.

## Reviews

![](https://secure.gravatar.com/avatar/41184eff6911930093f029452b1874d6a6a5913c38334076d340dbdd6d2d2491?
s=60&d=retro&r=g)

### 󠀁[10 Stars!](https://wordpress.org/support/topic/10-stars-28/)󠁿

 [willwenzel](https://profiles.wordpress.org/willwenzel/) སྤྱི་ཟླ་བཞི་པ། 15, 2024
2 replies

This plugin is perfect in its simplicity. Developers thought of everything, and 
it makes pages with images look beautiful. PLUS, if you don’t like the color they
pick to be dominant, you can choose another color from the image. So well thought
out. I just wish Wordpress wouldn’t bug me saying it hasn’t been tested with the
last 3 releases. It works perfectly, and probably will regardless of updates. Here’s
how I use it in a theme in case anyone reading this is struggling. if (has_post_thumbnail()){
$featured_image_id=get_post_thumbnail_id( );}$imageColor = get_color_data($featured_image_id,‘
dominant_color_hex’, ‘true’);$colorPaletteArray = get_post_meta ($featured_image_id,‘
color_palette_hex’, ‘true’);$complimentaryColor1 = $colorPaletteArray[0];$complimentaryColor2
= $colorPaletteArray[1];$complimentaryColor3 = $colorPaletteArray[2];$complimentaryColor4
= $colorPaletteArray[3]; And then I just assign $imageColor, and it’s 4 complimentary
colors, to the relevant divs in the template. Genius plugin, and thank you for creating
it.

![](https://secure.gravatar.com/avatar/eb360eed29632f622518f9fc8d09e6f441d19df4ac8f021fea37c05477f35a3f?
s=60&d=retro&r=g)

### 󠀁[Nice plugin](https://wordpress.org/support/topic/nice-plugin-3353/)󠁿

 [Ngo Quang Dao](https://profiles.wordpress.org/asksock/) སྤྱི་ཟླ་བཅུ་པ། 29, 2019

Useful plugin, please add function to bulk edit all images on gallery 🥰

![](https://secure.gravatar.com/avatar/14ce6e1762dc140b66df3188970e853dc59c81a6d13cf373ab9a4ab89227b2c0?
s=60&d=retro&r=g)

### 󠀁[Works well & doesn’t inject any front-end rubbish](https://wordpress.org/support/topic/works-well-doesnt-inject-any-front-end-rubbish/)󠁿

 [Justin Moreland](https://profiles.wordpress.org/justin-moreland/) སྤྱི་ཟླ་བཅུ་
གཉིས་པ། 12, 2018

I like this and how it does what it says. I like also that it doesn’t enqueue any
scripts or CSS into the page. Great for custom theme development. Also seems to 
work well in Wordpress 5.0 (newest at the time of this review).

![](https://secure.gravatar.com/avatar/943ed00c394e6a367c03ad0f1eba6fb5df30794b341327248b12a0d48d452373?
s=60&d=retro&r=g)

### 󠀁[Did exactly what I needed](https://wordpress.org/support/topic/did-exactly-what-i-needed-13/)󠁿

 [isteiner](https://profiles.wordpress.org/isteiner/) སྤྱི་ཟླ་དགུ་པ། 3, 2016

Pulls out both the dominant color and a nice color palette. Far more efficient to
do this calculation once on upload rather than via PHP or JavaScript when rendering
the page. Perfect!

![](https://secure.gravatar.com/avatar/c2a8e17d7bb01e281e3364c82443ac4183ab99f165ca2289f688da196f71ce61?
s=60&d=retro&r=g)

### 󠀁[Does what it says on the tin](https://wordpress.org/support/topic/does-what-it-says-on-the-tin-161/)󠁿

 [Sii Cockerill](https://profiles.wordpress.org/designtwelve/) སྤྱི་ཟླ་དགུ་པ། 3,
2016

I had to search the post_meta table to find out how the ‘dominant_override’ meta_key–
it would have been useful to find that in the release notes. A bulk calculate feature
would be excellent – along with a way of colour picking the override from the posts
screen in the WP Dashboard. Otherwise, perfect for what I need 🙂

 [ Read all 5 reviews ](https://wordpress.org/support/plugin/dominant-color/reviews/)

## Contributors & Developers

“Dominant Color” is open source software. The following people have contributed 
to this plugin.

Contributors

 *   [ Liam Gladdy ](https://profiles.wordpress.org/lgladdy/)

“Dominant Color” has been translated into 3 locales. Thank you to [the translators](https://translate.wordpress.org/projects/wp-plugins/dominant-color/contributors)
for their contributions.

[Translate “Dominant Color” into your language.](https://translate.wordpress.org/projects/wp-plugins/dominant-color)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/dominant-color/), check
out the [SVN repository](https://plugins.svn.wordpress.org/dominant-color/), or 
subscribe to the [development log](https://plugins.trac.wordpress.org/log/dominant-color/)
by [RSS](https://plugins.trac.wordpress.org/log/dominant-color/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

2.2.0

Modernise javascript for deprecated jQuery handlers
 Update to latest version of
[PHP Color Thief](https://github.com/ksubileau/color-thief-php) Bump version requirements
to match color thief and a modern-ish WordPress (5.4+)

2.1.0

Support translated languages (Submit your translation at translate.wordpress.org!)

2.0.1

Fix a bug where loading our JS in the footer would cause a javascript error.

2.0

Add a colour picker to the attachment edit screen to override the dominant color
with a custom pick.
 The WordPress media gallery will now let you pick a dominant
color override which will be returned in place of dominant_color_hex/rgb when set.
It’ll also let you generate a palette for legacy images uploaded before you installed
the plugin.

1.0

Initial Build

## Meta

 *  Version **2.2.0**
 *  Last updated **2 years ago**
 *  Active installations **300+**
 *  WordPress version ** 5.4 or higher **
 *  Tested up to **6.5.8**
 *  PHP version ** 7.2 or higher **
 *  Languages
 * [English (UK)](https://en-gb.wordpress.org/plugins/dominant-color/), [English (US)](https://wordpress.org/plugins/dominant-color/),
   [German](https://de.wordpress.org/plugins/dominant-color/), and [Spanish (Chile)](https://cl.wordpress.org/plugins/dominant-color/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/dominant-color)
 * Tags
 * [color](https://dzo.wordpress.org/plugins/tags/color/)[colour](https://dzo.wordpress.org/plugins/tags/colour/)
   [image](https://dzo.wordpress.org/plugins/tags/image/)
 *  [Advanced View](https://dzo.wordpress.org/plugins/dominant-color/advanced/)

## Ratings

 4.8 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/dominant-color/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/dominant-color/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/dominant-color/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/dominant-color/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/dominant-color/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/dominant-color/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/dominant-color/reviews/)

## Contributors

 *   [ Liam Gladdy ](https://profiles.wordpress.org/lgladdy/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/dominant-color/)