SlideShare a Scribd company logo
1 of 63
Color Me Flexible
New options for colorable D7 themes

              by @stevenmerrill

         steven@treehouseagency.com

            http://dgo.to/@smerrill
The Color Module
The Color Module

• Core module
The Color Module

• Core module

• New D7 core themes must support it
The Color Module

• Core module

• New D7 core themes must support it

• Nearly unchanged from Drupal 5 to 6
What’s Changed?
What’s Changed?

• Mainly, colors in .png files.
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.
What’s Changed?
What’s Changed?
• The stylesheet also gets
  rewritten.
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.
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”.
Color Shifting




   (Check out the _color_rewrite_stylesheet() and
 _color_shift() functions in color.module to see this.)
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.)
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.)
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.)
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.)
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.)
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.)
D5 / D6 Shortcomings




    Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!

• 5 colors tops




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
D5 / D6 Shortcomings
• Not flexible enough!

• 5 colors tops

  • Special meanings for most




              Credit: http://www.flickr.com/photos/foxtongue/23281162/
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/
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/
What Themers Want




  Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
What Themers Want
• More colors!




             Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
What Themers Want
• More colors!

• Customizable labels for said
  colors




             Credit: http://www.flickr.com/photos/pinksherbet/3528623354/
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/
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/
Improvements in D7




 All these examples are in Bartik’s color.inc, which is now in D7 core. Huzzah!
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!
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!
Customizable Previews




       Same deal. Check our core CVS.
Customizable Previews

• Each theme may now provide
  its own preview HTML, CSS
  and JavaScript files.




                    Same deal. Check our core CVS.
Garland’s Preview HTML
Garland’s Preview HTML

• Three divs
Garland’s Preview HTML

• Three divs

• An h2
Garland’s Preview HTML

• Three divs

• An h2

•Ap
Garland’s Preview HTML

• Three divs

• An h2

•Ap

• An a
Bartik’s Preview
Bartik’s Preview


• A tad bit more.
Bartik, cont’d
Bartik, cont’d

• Hi-fidelity live preview
Bartik, cont’d

• Hi-fidelity live preview

• Includes your site’s logo
Bartik, cont’d

• Hi-fidelity live preview

• Includes your site’s logo

  • JS magic at the top of
    color.inc
Not In Use
Not In Use

• PNG recoloring
Not In Use

• PNG recoloring

• color.module gradients
Not In Use

• PNG recoloring

• color.module gradients

• base color shifting
CSS3!
We don’t need no stinkin’ PNG files.
Limitations / D8 Roadmap
Limitations / D8 Roadmap


• Colors must be unique to be
  searched and replaced
Relevant Issues
• http://drupal.org/node/683026

• http://drupal.org/node/833154

• http://drupal.org/node/769922

• http://drupal.org/node/762462

• http://drupal.org/node/801446

• http://drupal.org/node/762474
                I know you love reading issue queues.
Relevant Issues
• http://drupal.org/node/776684

• http://drupal.org/node/778880

• http://drupal.org/node/693504

• http://drupal.org/node/700170

• http://drupal.org/node/762468

• http://drupal.org/node/845742
                       I sure do.
Thanks




Community plumbing, baby.
Thanks
• @jensimmons and the whole international group
  who worked on Bartik




                 Community plumbing, baby.
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.
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.
Questions?

More Related Content

What's hot

Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)Sean Cribbs
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elementsIn a Rocket
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / InheritanceIn a Rocket
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - Ivincentleeuwen
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for cssshabab shihan
 
Perfect Styling - How to write better CSS
Perfect Styling - How to write better CSSPerfect Styling - How to write better CSS
Perfect Styling - How to write better CSSArtem Tabalin
 
Schema Design for Riak
Schema Design for RiakSchema Design for Riak
Schema Design for RiakSean Cribbs
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal ThemingJohn Albin Wilkins
 
Web ninja html & css
Web ninja   html & cssWeb ninja   html & css
Web ninja html & cssAlfi Rizka
 
Extensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions PortlandExtensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions PortlandExtensis
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Developmentkmloomis
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developersHernan Mammana
 
Customizing the Appearance and HTML Output of Visualforce Pages
Customizing the Appearance and HTML Output of VisualforcePages Customizing the Appearance and HTML Output of VisualforcePages
Customizing the Appearance and HTML Output of Visualforce Pages Mohammed Safwat Abu Kwaik
 

What's hot (19)

Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)Schema Design for Riak (Take 2)
Schema Design for Riak (Take 2)
 
Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements
 
14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance14- Learn CSS Fundamentals / Inheritance
14- Learn CSS Fundamentals / Inheritance
 
HTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - IHTML(5) and CSS(3) for beginners - I
HTML(5) and CSS(3) for beginners - I
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for css
 
Perfect Styling - How to write better CSS
Perfect Styling - How to write better CSSPerfect Styling - How to write better CSS
Perfect Styling - How to write better CSS
 
Schema Design for Riak
Schema Design for RiakSchema Design for Riak
Schema Design for Riak
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal Theming
 
Web ninja html & css
Web ninja   html & cssWeb ninja   html & css
Web ninja html & css
 
Extensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions PortlandExtensis Web Typography Workshop | WebVisions Portland
Extensis Web Typography Workshop | WebVisions Portland
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Demystifying WordPress Conditional Tags
Demystifying WordPress Conditional TagsDemystifying WordPress Conditional Tags
Demystifying WordPress Conditional Tags
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
 
CSS
CSSCSS
CSS
 
Project Tools in Web Development
Project Tools in Web DevelopmentProject Tools in Web Development
Project Tools in Web Development
 
Frontend for developers
Frontend for developersFrontend for developers
Frontend for developers
 
Customizing the Appearance and HTML Output of Visualforce Pages
Customizing the Appearance and HTML Output of VisualforcePages Customizing the Appearance and HTML Output of VisualforcePages
Customizing the Appearance and HTML Output of Visualforce Pages
 
Ppt ch08
Ppt ch08Ppt ch08
Ppt ch08
 

Viewers also liked

Behavioral Segmentation Analytics
Behavioral Segmentation AnalyticsBehavioral Segmentation Analytics
Behavioral Segmentation AnalyticsLance Wills
 
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)CSR Västsverige
 
15RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep3015RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep30Wayne Reid
 
Plantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinningPlantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinningCarmen Ruiz Morcillo
 
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)CSR Västsverige
 
Life at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British ColumbiaLife at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British ColumbiaVCAD
 
Hudson: Your robotic butler
Hudson: Your robotic butlerHudson: Your robotic butler
Hudson: Your robotic butlerSteven Merrill
 
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...Texas A&M Transportation Institute
 
عيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتيةعيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتيةSherif Swedan
 
Importance of highway maintenance
Importance of highway maintenanceImportance of highway maintenance
Importance of highway maintenanceDharmesh Vadher
 
Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)Docker, Inc.
 
Pavement Maintenance Practices in
Pavement Maintenance Practices inPavement Maintenance Practices in
Pavement Maintenance Practices inMohhammad Sujon
 

Viewers also liked (15)

Behavioral Segmentation Analytics
Behavioral Segmentation AnalyticsBehavioral Segmentation Analytics
Behavioral Segmentation Analytics
 
November/December Leverage
November/December LeverageNovember/December Leverage
November/December Leverage
 
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ socialt ansvar (reviderad 2016)
 
15RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep3015RV&TT_Ford_SuperDtyPU_Sep30
15RV&TT_Ford_SuperDtyPU_Sep30
 
Plantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinningPlantilla creación proyecto_etwinning
Plantilla creación proyecto_etwinning
 
Daniel inglish
Daniel inglishDaniel inglish
Daniel inglish
 
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
CSR Västsveriges ansvarsinitiativ miljöansvar (reviderad 2016)
 
Life at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British ColumbiaLife at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
Life at VCAD on Instagram by creative_obscurities in Vancouver, British Columbia
 
Hudson: Your robotic butler
Hudson: Your robotic butlerHudson: Your robotic butler
Hudson: Your robotic butler
 
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
The Hamburg Rutting Test – Alternative Data Analysis Methods and HMA Screenin...
 
عيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتيةعيوب الرصفات الاسفلتية
عيوب الرصفات الاسفلتية
 
RAP, RAS and Durable Asphalt Pavements
RAP, RAS and Durable Asphalt PavementsRAP, RAS and Durable Asphalt Pavements
RAP, RAS and Durable Asphalt Pavements
 
Importance of highway maintenance
Importance of highway maintenanceImportance of highway maintenance
Importance of highway maintenance
 
Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)Securing your Containers (Meetup at Docker HQ 4/7)
Securing your Containers (Meetup at Docker HQ 4/7)
 
Pavement Maintenance Practices in
Pavement Maintenance Practices inPavement Maintenance Practices in
Pavement Maintenance Practices in
 

Similar to Color Me Flexible

Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Codinginspector_fegter
 
BITM3730 9-26.pptx
BITM3730 9-26.pptxBITM3730 9-26.pptx
BITM3730 9-26.pptxMattMarino13
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
44 Slides About 22 Modules
44 Slides About 22 Modules44 Slides About 22 Modules
44 Slides About 22 Modulesheyrocker
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compassNick Cooley
 
Developing client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp EdmontonDeveloping client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp EdmontonCurtis McHale
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS TroubleshootingDenise Jacobs
 
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Laura Scott
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptxMattMarino13
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptxMattMarino13
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceAdrian Roselli
 
Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3Divya Tiwari
 
Easier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdvEasier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdvJazkarta, Inc.
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme FrameworkJoe Casabona
 

Similar to Color Me Flexible (20)

Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
Wordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean CodingWordcamp St. Louis - Clean Coding
Wordcamp St. Louis - Clean Coding
 
BITM3730 9-26.pptx
BITM3730 9-26.pptxBITM3730 9-26.pptx
BITM3730 9-26.pptx
 
Css
CssCss
Css
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
44 Slides About 22 Modules
44 Slides About 22 Modules44 Slides About 22 Modules
44 Slides About 22 Modules
 
Advanced sass/compass
Advanced sass/compassAdvanced sass/compass
Advanced sass/compass
 
Developing client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp EdmontonDeveloping client themes for theme review for WordCamp Edmonton
Developing client themes for theme review for WordCamp Edmonton
 
Advanced CSS Troubleshooting
Advanced CSS TroubleshootingAdvanced CSS Troubleshooting
Advanced CSS Troubleshooting
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
Grok Drupal (7) Theming (presented at DrupalCon San Francisco)
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
Css
CssCss
Css
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Making Your Site Printable: Booster Conference
Making Your Site Printable: Booster ConferenceMaking Your Site Printable: Booster Conference
Making Your Site Printable: Booster Conference
 
Css present
Css presentCss present
Css present
 
Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3
 
Easier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdvEasier and faster Plone theming with Deliverance and xdv
Easier and faster Plone theming with Deliverance and xdv
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme Framework
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

Color Me Flexible

  • 1. Color Me Flexible New options for colorable D7 themes by @stevenmerrill steven@treehouseagency.com http://dgo.to/@smerrill
  • 3. The Color Module • Core module
  • 4. The Color Module • Core module • New D7 core themes must support it
  • 5. The Color Module • Core module • New D7 core themes must support it • Nearly unchanged from Drupal 5 to 6
  • 6.
  • 7.
  • 8.
  • 10. What’s Changed? • Mainly, colors in .png files.
  • 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.
  • 13. What’s Changed? • The stylesheet also gets rewritten.
  • 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.)
  • 23. D5 / D6 Shortcomings Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 24. D5 / D6 Shortcomings • Not flexible enough! Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 25. D5 / D6 Shortcomings • Not flexible enough! • 5 colors tops Credit: http://www.flickr.com/photos/foxtongue/23281162/
  • 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!
  • 37. Customizable Previews Same deal. Check our core CVS.
  • 38. Customizable Previews • Each theme may now provide its own preview HTML, CSS and JavaScript files. Same deal. Check our core CVS.
  • 41. Garland’s Preview HTML • Three divs • An h2
  • 42. Garland’s Preview HTML • Three divs • An h2 •Ap
  • 43. Garland’s Preview HTML • Three divs • An h2 •Ap • An a
  • 45. Bartik’s Preview • A tad bit more.
  • 48. Bartik, cont’d • Hi-fidelity live preview • Includes your site’s logo
  • 49. Bartik, cont’d • Hi-fidelity live preview • Includes your site’s logo • JS magic at the top of color.inc
  • 51. Not In Use • PNG recoloring
  • 52. Not In Use • PNG recoloring • color.module gradients
  • 53. Not In Use • PNG recoloring • color.module gradients • base color shifting
  • 54. CSS3! We don’t need no stinkin’ PNG files.
  • 55. Limitations / D8 Roadmap
  • 56. Limitations / D8 Roadmap • Colors must be unique to be searched and replaced
  • 57. Relevant Issues • http://drupal.org/node/683026 • http://drupal.org/node/833154 • http://drupal.org/node/769922 • http://drupal.org/node/762462 • http://drupal.org/node/801446 • http://drupal.org/node/762474 I know you love reading issue queues.
  • 58. Relevant Issues • http://drupal.org/node/776684 • http://drupal.org/node/778880 • http://drupal.org/node/693504 • http://drupal.org/node/700170 • http://drupal.org/node/762468 • http://drupal.org/node/845742 I sure do.
  • 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.

Editor's Notes