You are here

function commons_origins_get_palettes in Drupal Commons 7.3

Returns an array of color palettes keyed on class name.

1 call to commons_origins_get_palettes()
commons_origins_palettes_form in themes/commons/commons_origins/commons_origins.palettes.inc
Add a color palette selection to a form.

File

themes/commons/commons_origins/commons_origins.palettes.inc, line 6

Code

function commons_origins_get_palettes() {
  $palettes = array(
    'default' => 'Default',
    'palette-gray-lightgray-blue' => 'Grey/light grey/blue',
    'palette-blue-blue' => 'Blue/blue',
    'palette-magenta-blue' => 'Magenta/blue',
    'palette-black-green' => 'Black/green',
    'palette-brown-burnt-orange' => 'Brown/burnt orange',
    'palette-brown-yellow' => 'Brown/yellow',
    'palette-seafoam-orange' => 'Seafom orange',
    'palette-orange-red' => 'Orange/red',
    'palette-black-blue-yellow' => 'Black blue yellow',
    'palette-black-white-red' => 'Black/white/red',
    'palette-brick-brick' => 'Brick',
  );
  foreach ($palettes as $key => $name) {
    $palettes[$key] = theme('image', array(
      'alt' => t($name),
      'title' => t($name),
      'path' => drupal_get_path('theme', 'commons_origins') . "/images/palettes/{$key}.png",
    ));
  }
  return $palettes;
}