Last updated June 6, 2011. Created by webernet on October 8, 2007.
Edited by eli-f, Carolyn, arianek, Tor Arne Thune. Log in to edit this page.
The Color module allows users with the Administer site configuration permission to quickly and easily change the color scheme of themes that have been built to be compatible with it.
In order for color module to work, a theme must be specifically designed to use the color changing features. The Drupal 6 default theme, Garland, and the Drupal 7 default theme, Bartik, were both designed to take advantage of this module.
Uses
Using the Color module allows you to easily change the color of links, backgrounds, text, and other theme elements
Basic configuration
The Color module comes enabled in the Drupal 7 standard profile. You will have to enable the module if you are using Drupal 6 or the Drupal 7 minimal profile.
After enabling the Color module, navigate to your theme's configuration page (in Drupal 7, Administration > Appearance or http://example.com/admin/appearance) and click "Settings" for your theme. This will display the color picker tool which will allow you to modify the theme's color settings.
To change the color settings for a compatible theme, select the Settings link for your theme on the Themes administration page. If you don't see a color picker on that page, then your theme is not compatible with the color module. If you are sure that the theme does indeed support the color module, but the color picker does not appear, then follow these troubleshooting procedures.
Color module saves a modified copy of the theme's style.css file in the files directory, and includes it after the theme's original style.css. This means that if you make any manual changes to your theme's style.css file, you must save your color settings again, even if they haven't changed. This causes the Color module-generated version of style.css in the files directory to be recreated using the new version of the original file. This step is required because the module stylesheets (in the files directory) need to be recreated to include your changes.
More about Color module:
Note: Color module requires your file download method to be set to public - for different configurations, see the section below.
Advanced usage with downloads set to private
If you want to use color.module in conjunction with the "private" download method, then there are a couple of options:
- Configure your theme colors on a test site and copy the resulting files (look in the
/colorfolder in the "files" folder) to a named subfolder of the main theme, thus creating a CSS-only theme (see Theming overview). - If the contents of your "files" directory are actually accessible directly via HTTP (which will actually be the case with the "private" download method unless you have either set up the "files" directory outside your web root or added additional directives to the default .htaccess file that Drupal creates in the "files" folder so as to prevent such access) then you may be able to switch to "public" download method temporarily while you configure the color scheme, switching back to "private" afterwards. Be aware that changing the download method will modify all download paths and may cause unexpected problems on an existing site.
Comments
Trying to learn Color
I am not sure if I am doing something wrong or if anyone can help me. I am not a programmer but bumping along in my knowledge of css. The problem I am running into is that when I try to create sub themes it seems that they don't color very well once saved.
I am trying to build a few color specific sub themes under Pixture Reloaded for my site. The issue is when I create a appropriate sub theme and rename the .info file and the folder to something other than Pixture Reloaded and save it with a new color scheme, I go to switch theme under user settings and I get a discolored original Pixture Reloaded theme. In my sites/default/files I have a new CSS file saved as well as a new color file. It seems that all the files are correct inside...what is happening? I do not want to alter Pixture Reloaded- only want to create sub themes with different colors. I want to make a color switch painlessly easy for the users.
Better late than never
What I have found that works on the mobile thing we are developing is that your top level or "default" color schema has to match your existing CSS.
With few exceptions the "find and replace" will work primarily with the 5 colors in the default pick and whatever the selectors choose.
I have read in several help I have found that it will adjust other colors in the CSS in a relative way, but this seems to be hit or miss.
Also, the find and replace does not seem to work in the html and body selectors. This might be intentional.
I just want to change the background color!
I'm currently configuring the garland theme for my first drupal site build. I'm making these pages for my work at a non-profit. The site is simple and outlines our volunteer policies and programs.
The color module is great to easily theme the most regions of garland but I simply want to change the background color of the page content type which is defaulted to white.
I'm new to Drupal and CSS but I have firebug installed so I've been learning a bit of the logic behind css. I can't seem to figure out where the background color of a page node content type is defined in css. From reading through other forum posts it seems that modifying the background color of a page in garland is harder than just editing the css style sheet.
What am I missing here? Why is this so difficult? I thought I could just put a new background color line in the proper css class but nothing seems to work.
I feel like I'm totally lost on this.
Thanks for any replies
I hear you.
I have tried for weeks to make garland just be black. I am new also but I tried many things. I have seen others looking for the same. I can tell you that there is not likely an easy answer. If I had started with maybe the zen theme, learned how to make it black and then learned how to make a nicer layout with it like garland has I would probably be further along. I kept thinking I was very close, but I give up. Too much wasted time. Please let me know if you solve it. dlr@leanmean.net Thanks and best wishes.
d
Letting users change the background color IS possible!
with this nifty module and view, users with the permission can administer website backgrounds.
http://drupal.org/node/244744#comment-4134834
follow me on twitter.
drupal_sensei