11. What’s Changed?
• Mainly, colors in .png files.
• Lots of information available at
http://drupal.org/node/
108459 regarding exactly
what color.module can do and
how Garland is assembled.
14. What’s Changed?
• The stylesheet also gets
rewritten.
• CSS files are processed by a
regex that splits up the file into
chunks whenever it finds the
pattern #aaaaaa or #aaa.
15. What’s Changed?
• The stylesheet also gets
rewritten.
• CSS files are processed by a
regex that splits up the file into
chunks whenever it finds the
pattern #aaaaaa or #aaa.
• The CSS parser stops when it
hits a comment with the text
“Color Module: Don’t Touch”.
16. Color Shifting
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
17. Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
specifies 5 colors: base, link, top,
bottom, text.
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
18. Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
specifies 5 colors: base, link, top,
bottom, text.
• These determine how colors shift:
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
19. Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
specifies 5 colors: base, link, top,
bottom, text.
• These determine how colors shift:
• Exact matches are replaced.
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
20. Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
specifies 5 colors: base, link, top,
bottom, text.
• These determine how colors shift:
• Exact matches are replaced.
• ‘a’ selectors are shifted towards
‘link’.
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
21. Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
specifies 5 colors: base, link, top,
bottom, text.
• These determine how colors shift:
• Exact matches are replaced.
• ‘a’ selectors are shifted towards
‘link’.
• ‘color: [blah]’ declarations are shifted
towards ‘text’.
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
22. Color Shifting
• A Drupal 5 or 6 theme’s color.inc file
specifies 5 colors: base, link, top,
bottom, text.
• These determine how colors shift:
• Exact matches are replaced.
• ‘a’ selectors are shifted towards
‘link’.
• ‘color: [blah]’ declarations are shifted
towards ‘text’.
• All others are shifted towards ‘base’.
(Check out the _color_rewrite_stylesheet() and
_color_shift() functions in color.module to see this.)
26. D5 / D6 Shortcomings
• Not flexible enough!
• 5 colors tops
• Special meanings for most
Credit: http://www.flickr.com/photos/foxtongue/23281162/
27. D5 / D6 Shortcomings
• Not flexible enough!
• 5 colors tops
• Special meanings for most
• Image recoloring is not always
the answer
Credit: http://www.flickr.com/photos/foxtongue/23281162/
28. D5 / D6 Shortcomings
• Not flexible enough!
• 5 colors tops
• Special meanings for most
• Image recoloring is not always
the answer
• Hardcoded preview HTML
and JavaScript
Credit: http://www.flickr.com/photos/foxtongue/23281162/
29. What Themers Want
Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
30. What Themers Want
• More colors!
Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
31. What Themers Want
• More colors!
• Customizable labels for said
colors
Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
32. What Themers Want
• More colors!
• Customizable labels for said
colors
• Use of CSS3 gradients and
progressive enhancement
Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
33. What Themers Want
• More colors!
• Customizable labels for said
colors
• Use of CSS3 gradients and
progressive enhancement
• “Quality meals at affordable
prices”
– (http://dgo.to/@johnvsc)
Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
34. Improvements in D7
All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
35. Improvements in D7
• An unlimited number of
customizable colors with
labels that show up in the UI.
All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
36. Improvements in D7
• An unlimited number of
customizable colors with
labels that show up in the UI.
• ‘base’, ‘link’ and ‘text’ still
maintain their magic color-
shifting prowess.
All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
60. Thanks
• @jensimmons and the whole international group
who worked on Bartik
Community plumbing, baby.
61. Thanks
• @jensimmons and the whole international group
who worked on Bartik
• Members of the Busy and Corolla groups who
chimed in on these issues
Community plumbing, baby.
62. Thanks
• @jensimmons and the whole international group
who worked on Bartik
• Members of the Busy and Corolla groups who
chimed in on these issues
• Dries and webchick for committing
color.module patches
Community plumbing, baby.