Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using a Drupal theme which makes use of the colour picker. When I select a new colour scheme, a directory gets creates in MyDrupalSite/sites/default/files/color/ThemeName-RandomNumer. Using Opera's developer console, I can see that these files (the generated images and CSS) are used to render the website (if CSS caching is switched off, of course). However, I have no idea where Drupal is told to look in that directory for the CSS: it doesn't seem to be in a config file and I have no idea where something like that might be stored in the DB. I would also like to know where the colours for a "custom" configuration are stored: I spent a large chunk of last night trying to figure that out, but to no avail. Are they somehow encoded into the "RandomNumber"? So, if someone could enlighten me, I would be much obliged.

share|improve this question

You'll find that the color form on your theme saves the locations of the files as variables at the end of its save operation:

  // Maintain list of files.
  variable_set('color_'. $theme .'_stylesheets', $css);
  variable_set('color_'. $theme .'_files', $paths['files']);

These values are then picked up by your color-aware theme. For instance, the Drupal 6 default theme (Garland) has the following in it's phptemplate_preprocess_page():

  // Hook into color.module
  if (module_exists('color')) {

This will add the CSS files to the header.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.