Code Monkey home page Code Monkey logo

color-palette-generator's Introduction

Color Palette Generator

Generate color palettes for your WordPress images, append them to your images inside your content and make searching images by color available to your visitors.

Description

This plugin is ideal for blog owners who like to do something more with their images, or for webshop owners who like to filter products by color. When inserting images you have the option to show the palette for that image. You can also use the following shortcode to show a specific image with palette: [colorpalette attachment="56" dominant="false" colors="10" size="large" random="true"]

Features

  • Generate color palettes per image
  • Bulk-generate color palettes for all images
  • Allows configuration of number of unique colors per image
  • Allows configuration of auto appending palettes on attachment pages
  • See stats of generated palettes
  • Filter attachments by color
  • Add color search widget to your sidebar
  • Use a shortcode to show an image with a palette in your content.

Developers

If you don't like the way the plugin outputs the palettes, or you want to create custom color queries yourself, use the wordpress taxonomy functions. There are 2 new taxonomies added when the plugin is activated: cpg_dominant_color and cpg_palette. The first one holds one color per image, the dominant color (this color is used to link the image to one of the main colors used in the color search functions). The second one holds the palette, and the number of colors is based on what the site owner has entered (default = 10).

If you want to create your own search template, add a templates folder in your theme and add a search.php file in there. If that file is found it will be used to show the searchresults. Else the template from the plugin will be used.

Special thanks

Installation

Automatic Installation:

  1. Go to Admin - Plugins - Add New and search for "color palette generator"
  2. Click the Install Button
  3. Click 'Activate'
  4. Go to Media > Color Palette Generator and start generating

Manual Installation:

  1. Download color-palette-generator.zip
  2. Unzip and upload the 'color-palette-generator' folder to your '/wp-content/plugins/' directory
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. Go to Media > Color Palette Generator and start generating

Screenshots

Available here

  1. The Color palette generator settings page
  2. A new media library column will be available
  3. When inserting images into your content, new options will be available
  4. Add a widget to your sidebar
  5. The palette in use
  6. A list of generated palettes

Todo

  • Better uninstall functions (attachment meta needs to be removed)
  • Generate palette on upload

Changelog

1.7.0

  • Added support for automatic generation of palettes. Disabled by default.

1.6.2

  • Fixed php warning
  • Fixed missing color palettes if no dominant colors are set

1.6.1

  • Fixed php warning

1.6

  • Changed the dasboard layout
  • Added a remove button to remove all generated palettes
  • Added an option to control how the palette colors are shown
  • The bulk generation is now around 10 times faster (especially noticeable with more than 10.000 images in your library)

1.5.2

  • Fixed loading of front-end styles

1.5.1

  • Removed 'Dominant: ' title before color codes when hovering over palette colors.

1.5

  • Added 2 new settings to allow clicking the dominant & palette colors. Each color will link to the search page of the related dominant color.

1.4

  • Added new shortcode to show all generate palettes (without the images)

1.3

  • Validate, sanetize & escape

1.2

  • Removed TAH references

1.1

  • Fix WordPress warnings

1.0

  • First official release

0.9

  • Final beta release

0.8

  • Beta release

0.7

  • Beta release

color-palette-generator's People

Contributors

houke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

color-palette-generator's Issues

ACF Gallery

Hi
I have a cpt set up titled 'works' and using an acf pro gallery-field titled 'rga_images' - im appending the main url with the various /color/color options but nothing is showing up. What's the best option here? Do I need to edit the search.php template?

Incredible work on the plugin btw

Attachments post parent

Hey man
Happy New Year!
Is possible to the get the parent post link of an attachment - to replace the link to the attachment page in search results?
Ideally the ability to bring in associated custom fields too?
Thanks again in advance
Gareth

Todo: Generate palette on upload

Do you have plans to make " Generate palette on upload" available? How is the development?

I ask you why I liked your script and would like to use this functionality (I'm a designer, frontend - I do not know how to program in PHP) :)

Nice plugin, congrats bro!

Search Options

More a feature request - is it possible to include an option for search results to not solely rely on the dominant colour. I'm working with quite a bland set of images with small flourishes of colour. I can see those colours being picked up by the palette generator but search results are only using dominant colour which is typically grey.

Basically making the search function more fun and less rigid!
Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.