Results 1 to 9 of 9

Thread: How to change colors of the default Sugar theme

  1. #1
    j.mouco is offline Junior Member
    Join Date
    Apr 2011
    Posts
    4

    Default How to change colors of the default Sugar theme

    Hello,

    I'm new in Sugar, I wonder how can I change the default colors in the default Sugar theme.

    I'm using the last version, Version 6.2.0beta3.

    I looked for the answer in the forum but it seems that the answers are based on older versions of Sugar.

    My organization theme is white and red. Therefore, I'd like to change the default blue color in the menu to a red.

    Thanks for your help.

    www.ishr.ch

  2. #2
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: How to change colors of the default Sugar theme

    My approach:
    I am using Firefox with the firebug extension. With that tool it is relatively easy to find out which css styles should be changed and it is possible to do a change directly in firebug to see if it works fine. If this is ok you should go into the theme's css-file (in most cases themes/<themename>/css/style.css) and do the real change. To get the results to screen you should now delete the cache/themes/<themename> directory and reload the Sugar page.
    In my case I have created my own theme first which contains all my changes: I've copied Sugar5 theme, changed themedef.php and afterwards I did all the css changes. (I created it in sugar 6.0.1, later I moved it to 6.2.0beta with success -> therefore I had to create a zip file including my theme plus manifest.php and loaded this module into 6.2.0beta)
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  3. #3
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: How to change colors of the default Sugar theme

    Here a screenshot from firefox with firebug. A small example with changing blue colors into red and green (just to show the effect):
    Attached Images Attached Images  
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  4. #4
    j.mouco is offline Junior Member
    Join Date
    Apr 2011
    Posts
    4

    Default Re: How to change colors of the default Sugar theme

    Thanks a lot, it's very interesting.

    I found something interesting when I tried to modify the main menu colors. Actually, the background is an image located in themes\xxx\images.

    There, you'll find already different style like otherTabBlue.gif for the blue theme or otherTabRed.gif for the red theme. The question is, how can I activate the red template?

  5. #5
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: How to change colors of the default Sugar theme

    There are several files with different colors used for background available in the theme directory, at least these::
    currentTab<Color>.gif
    otherTab<Color>.gif
    tabRow<Color>Bg.gif
    In all cases there exist files with <Color> empty (these files are used for default) or set to 'Blue', 'Grey', 'Green', etc.

    If you want to change the color I would do the following: copy the colored-file of your choice to the filename without <Color> set, e.g. "copy otherTabRed.gif otherTab.gif". I didn't try this but if you do this with all Background files you should get what you want. The alternative would be to change the entries in style.css from e.g.

    Code:
    #moduleList > ul > li
    {
        background-image:url(../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=otherTab.gif);
    }
    to

    Code:
    #moduleList > ul > li
    {
        background-image:url(../../../../index.php?entryPoint=getImage&themeName=Sugar55&imageName=otherTabRed.gif);
    }
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

  6. #6
    GekM is offline Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Default Re: How to change colors of the default Sugar theme

    Hi,
    can there be any other variants to do this?
    In old 5.x versions it was realised. And I think, what it could be done like it was in old version. There was function SUGAR.themes.changeColor('{COLOR_NAME}'), but i can't find it. I think, in old versions that function changed colors in theme.
    Have you got any ideas?

  7. #7
    GekM is offline Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Default Re: How to change colors of the default Sugar theme

    Hi,
    Are there any other variants?
    In old 5.x versions it was realised. And I think i could be done on a similar algorithm. There was function SUGAR.themes.changeColor('{COLOR_NAME}'). I think this function chenged theme color, but i can't find it.
    Do you have any ideas?
    Thanks.

  8. #8
    GekM is offline Junior Member
    Join Date
    Mar 2012
    Posts
    3

    Question Re: How to change colors of the default Sugar theme

    Hi,
    Are there any other ways to do this?

  9. #9
    sts's Avatar
    sts
    sts is offline Sugar Community Member
    Join Date
    Aug 2010
    Posts
    978

    Default Re: How to change colors of the default Sugar theme

    As far as I know there is no such function in 6.x .
    Stefan Ulrich Sauer
    System Analyst

    Devoteam Danet GmbH
    Gutenbergstraße 10
    D-64331 Weiterstadt
    Germany
    email: Stefan-Ulrich.Sauer@devoteam.com
    http://www.devoteam.de

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 2010-06-04, 12:34 PM
  2. Change Default Theme
    By aubreyisland in forum Help
    Replies: 6
    Last Post: 2009-02-24, 02:27 PM
  3. Replies: 2
    Last Post: 2007-10-27, 04:34 AM
  4. How do i change default theme?
    By patkini in forum Developer Help
    Replies: 4
    Last Post: 2007-08-15, 05:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •