Skip to content

Instantly share code, notes, and snippets.

@kprovance
Created April 24, 2014 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kprovance/11240037 to your computer and use it in GitHub Desktop.
Save kprovance/11240037 to your computer and use it in GitHub Desktop.
color schemes
1. Delete old version of color_schemes
2. Remove all references to color schemes in config file.
3. Delete any leftover JSON file(s) in uploads/redux_color_schemes.
4. Reset all to ensure any leftover DB entries are nuked.
5. Install new version
6. Use field array below (changes since last time)
array(
'id' => 'opt-color-scheme',
'type' => 'color_scheme',
'title' => 'Color Schemes',
'subtitle' => 'Save and load color schemes',
'options' => array(
'show_input' => true,
'show_initial' => true,
'show_alpha' => true,
'show_palette' => true,
'show_palette_only' => false,
'show_selection_palette' => true,
'max_palette_size' => 10,
'allow_empty' => true,
'clickout_fires_change' => false,
'choose_text' => 'Choose',
'cancel_text' => 'Cancel',
'show_buttons' => true,
'container_class' => 'redux-colorpicker-container', // popup css
'replacer_class' => 'redux-colorpicker-replacer', // picker css
'palette' => array( // 16 colors
// array("#000000", "#000084", "#0000ff", "#840000"),
// array("#840084", "#008200", "#ff0000", "#008284"),
// array("#ff00ff", "#848200", "#848284", "#00ff00"),
// array("#ffa600", "#00ffff", "#c6c3c6", "#ffff00"),
// array("#ffffff")
),
),
'default' => array(
array(
'id' => 'body',
'title' => 'body color',
'color' => '#fdfdfd',
'alpha' => 1,
'selector' => 'body',
'important' => true
),
array(
'id' => 'body-background',
'title' => 'background color',
'color' => '#ededed',
'alpha' => 1,
'selector' => '.body-background',
'mode' => 'background-color'
),
array(
'id' => 'nav',
'title' => 'navigation',
'color' => '#f3de4a',
'alpha' => 1,
'selector' => '.nav'
),
array(
'id' => 'menu',
'title' => 'menu',
'color' => '#fdfdfd',
'alpha' => 1,
'selector' => '.menu'
),
array(
'id' => 'menu-background',
'title' => 'menu background',
'color' => '#ededed',
'alpha' => 1,
'selector' => '.menu-background'
),
array(
'id' => 'menu-text',
'title' => 'navigation',
'color' => '#f3de4a',
'alpha' => 1,
'selector' => '.menu-text'
),
array(
'id' => 'menu-highlight',
'title' => 'menu highlight',
'color' => '#fdfdfd',
'alpha' => 1,
'selector' => '.menu-highlight'
),
array(
'id' => 'footer',
'title' => 'footer',
'color' => '#ededed',
'alpha' => 1,
'selector' => '.footer'
),
array(
'id' => 'copyright',
'title' => 'copyright',
'color' => '#f3de4a',
'alpha' => 1,
'selector' => '.copyright'
),
)
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment