function color_get_palette
7.x color.module | color_get_palette($theme, $default = FALSE) |
6.x color.module | color_get_palette($theme, $default = false) |
Retrieves the color palette for a particular theme.
3 calls to color_get_palette()
- color_scheme_form in drupal-7.x/
modules/ color/ color.module - Form constructor for the color configuration form for a particular theme.
- color_scheme_form_submit in drupal-7.x/
modules/ color/ color.module - Form submission handler for color_scheme_form().
- _color_rewrite_stylesheet in drupal-7.x/
modules/ color/ color.module - Rewrites the stylesheet to match the colors in the palette.
File
- drupal-7.x/
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);
}