I'm looking into the code for color.module, and it seems very directed at the Garland theme. The only colors that can be defined are Base Color, Link Color, Header Top, Header Bottom, and Text Color. It's very directed, which goes against the whole idea of drupal in my mind. It should be usable by all themes.

I think the theme ought to define what the titles are for the theme in the color.inc file. It really shouldn't be limited to only 5 colors either.

Comments

bradlis7’s picture

Well, it seems like the color module has a lot of things that keep it from working with other themes (I think it requires at least one image to be generated). Is there going to be documentation on how to get it working, or will there eventually be more work done on the project to make it work with other themes?

My theme only needs a color selector. The only real image is the logo, and that's the way it is with many of my themes. Can we at least get it working to where no images are required, and then documentation on how to do so?

Many Thanks.

bradlis7’s picture

Title: Color names in theme admin form » Ability to Work For Other Themes
bradlis7’s picture

Title: Ability to Work For Other Themes » Color.module And Other Themes

Sorry, I just wanted to make it clear.

dodorama’s picture

I would like some directions, too.

Tresler’s picture

Assigned: Unassigned » Tresler
Category: bug » task

I've been working on this for a bit now and I just got it working with another theme. My next step (maybe before the weekend will be to write up a HowTo for integrating this module with themes. If someone else wants to steal this task, feel free, but if not, I'll attach the Howto here soon.

Until then, this might get you started.

Copy this into template.php

function _phptemplate_variables($hook, $vars) {
  if ($hook == 'page') {

 
    // Hook into color.module
    if (module_exists('color')) {
      _color_page_alter($vars);
    }
    return $vars;
  }
  return array();
}

Replace the base.png file with one of your choice.

Edit color.inc to reflect your base.png

Include any color schemes you want in color.inc as well.

More to come.

Tresler’s picture

Status: Active » Closed (fixed)

Strike that. Here it is http://drupal.org/node/108459