1

Recently I've been seeing a lot of premium wordpress themes that includes a palet to change background colors, like this one: http://pexeto.com/dandelion_wp/ and this one: http://kaptinlin.com/themes/striking/

Is the colour being saved in the database or is just changes in the current session?

UPDATE (Copied from duplicate)

Basically, I would like to add this color picker:

enter image description here

To a custom "Theme Options" to let the client pick, for instance, the color of links or company identity colors (maybe some divs' background).

and how the code that modifies the CSS would look like?

How to do that?

1 Answer 1

1

The color is being saved in a cookie set via javascript.

This is more of a JavaScript question.

How to change the background color with a color picker: https://stackoverflow.com/questions/4146621/changing-colors-with-jquery-with-a-color-picker

How to use jQuery to manage cookies: http://www.ilovecolors.com.ar/using-cookies-jquery/

1
  • 2
    @janoChen - NOTE: You don't need to download a jQuery color picker, Farbtastic is included with WordPress(it's a jQuery color picker), and i think the exact same one used on the first link in the question (it's easy to use to).
    – t31os
    Commented Jan 23, 2011 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.