Our intended use of Color NG is to allow the end-user/webmaster to easily modify the appearance of the site. We are working hard to make the workflow and maintenance of a Drupal powered site more intuitive for our clients and hence lowering the threshold for properly mastering a Drupal web.

The theme we are currently developing (will be committed to Drupal CVS) only makes use of the tag replacement method on a single CSS-file to which basically all the colors have been extracted to. (Currently it holds 20+ fields.) Although we are trying to use descriptive field names in order to make the scheme edit form more intuitive, it still isn't quite good enough.

I realize it will take a substantial amount of work and re-design but the first step would perhaps be to allow $info['fields'] to hold associative arrays instead of single strings. That would make the API more extendable.

Something like this silly example would be nice:

$info['fields']['text'] = array(
  'label' => 'Text',
  'description' => 'This should be in contrast with the container background (see below) and the link color (see below).',
  'weight' => -50,
);

$info['fields']['link'] = array(
  'label' => 'Links',
  'description' => 'Applies to all links. This should be in contrast with the container background (see below) and the text color (see above).',
  'weight' => -48,
);

$info['fields']['container-background'] = array(
  'label' => 'Container',
  'description' => 'This field sets the background color of the main container. This is where main content is published. If you wish to change the background of the areas outside the container, please refer to Body Background, and to change the background of the sidebars see Sidebar background',
  'weight' => -10,
);

At the moment our fields array looks like this. The suffixes -background-top and -background-bottom refer to the start and end of a 'y-gradient':

$info['fields'] = array(
  'link',
  'text',
  'container-background',
  'body-background-top', // <body> gradient background
  'body-background-bottom',
  'logo-top', // gradient background for logo AND/OR title
  'logo-bottom',
  'logo-border',
  'footer-border',
  'footer-top', // gradient
  'footer-bottom', //
  'footer-text',
  'frame-outer',
  'frame-inner',
  'sidebar-background',
  'menu-top', // gradient
  'menu-bottom', // gradient
  'menu-text',
  'menu-hover',
  'menu-hover-text',
  'submenu-frame',
  'submenu-background', // solid fill
  'submenu-text',
  'submenu-hover',
  'submenu-hover-text',
);

--- danial

Comments

tonyn’s picture

Danial,

If it's an improvement that will open things up, good. Nothing is off the table.

Essentially we have more complex themes which use tag replacement. These tags currently do not offer descriptions. Or any real structure to help things stay organized.

Will experiment with things.

Tony