You are here

function color_get_palette in Drupal 7

Same name and namespace in other branches
  1. 8 core/modules/color/color.module \color_get_palette()
  2. 5 modules/color/color.module \color_get_palette()
  3. 6 modules/color/color.module \color_get_palette()
  4. 9 core/modules/color/color.module \color_get_palette()

Retrieves the color palette for a particular theme.

3 calls to color_get_palette()
color_scheme_form in modules/color/color.module
Form constructor for the color configuration form for a particular theme.
color_scheme_form_submit in modules/color/color.module
Form submission handler for color_scheme_form().
_color_rewrite_stylesheet in modules/color/color.module
Rewrites the stylesheet to match the colors in the palette.

File

modules/color/color.module, line 152
Allows users to change the color scheme of themes.

Code

function color_get_palette($theme, $default = FALSE) {

  // Fetch and expand default palette.
  $info = color_get_info($theme);
  $palette = $info['schemes']['default']['colors'];

  // Load variable.
  return $default ? $palette : variable_get('color_' . $theme . '_palette', $palette);
}