Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Colours.

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
byrons



Joined: 27 Jan 2005
Posts: 17

PostPosted: Fri Feb 04, 2005 2:09 pm    Post subject: Colours. Reply with quote

Hey all,

Not sure if this has been done before, if so, damn.

Today I was getting a bit fed up trying to match colours when I wanted to create the awesome 'Fire' effect, so I decided to arrange my colours a bit better.


This is purely cosmetic and will create no additional functionality to the wonderful cacti.
I take no responsibility for these instructions, USE AT YOUR OWN RISK :p (always wanted to say that)



1. With PHPMyAdmin, drop the table 'colors' and import the new colors.sql

With your favourite editor (php expert editor).

2. Open "color.php" located in your cacti root.


Change Line 131:


From This:

Code:
$color_list = db_fetch_assoc("select * from colors order by hex");


To This:

Code:
$color_list = db_fetch_assoc("select * from colors order by id");




3 . Open "html_form.php" located in in "/cacti/lib"


Change line 370:


From This:

Code:
$colors_list = db_fetch_assoc("select id,hex from colors order by hex desc");


To This:

Code:
$colors_list = db_fetch_assoc("select id,hex from colors order by id"); 



Make sure you update your Graph Templates with your new colours


Here are some screen shots showing you what I mean.

Before


After



after_drop.jpg
 Description:
After Drop Box
 Filesize:  29.94 KB
 Viewed:  10526 Time(s)

after_drop.jpg



before_drop.jpg
 Description:
Before Drop Box
 Filesize:  29.48 KB
 Viewed:  10525 Time(s)

before_drop.jpg



colors.txt
 Description:
Colours !!!

Download
 Filename:  colors.txt
 Filesize:  5.08 KB
 Downloaded:  777 Time(s)

Back to top
byrons



Joined: 27 Jan 2005
Posts: 17

PostPosted: Fri Feb 04, 2005 2:10 pm    Post subject: Reply with quote

Hmm, have I put this in the right forum category?
Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5448
Location: Wisconsin, USA

PostPosted: Fri Feb 04, 2005 3:03 pm    Post subject: Reply with quote

Oooooooooo, I like...

Never really paid that close attention to the colors, but often wondered why they where so mixed up.

Btw, if some removes or adds colors, you will still have problems with the order, because of the ID. I will look, maybe I can talk Ian into just having a big list that is generated automatically, instead of storing it in the database.
Back to top
byrons



Joined: 27 Jan 2005
Posts: 17

PostPosted: Fri Feb 04, 2005 3:50 pm    Post subject: Reply with quote

The main objective of this was to create all the colours I would need and then import the table repeating the process if I needed to add more colours

I do like your idea, another way is to have the additional id's editable from within Cacti.
Back to top
cjennings_cr



Joined: 06 Jan 2005
Posts: 20

PostPosted: Tue Oct 04, 2005 8:46 am    Post subject: Reply with quote

If you want - here is the entire WWW safe color set - sorted by hue. This is the SQL code that I imported.


Colors-small.JPG
 Description:
 Filesize:  105.88 KB
 Viewed:  9385 Time(s)

Colors-small.JPG



colors.txt
 Description:

Download
 Filename:  colors.txt
 Filesize:  18.2 KB
 Downloaded:  736 Time(s)

Back to top
mgb
Cacti User


Joined: 21 Jun 2004
Posts: 102
Location: North of the Netherlands

PostPosted: Wed Oct 05, 2005 2:21 am    Post subject: Reply with quote

These little things make cacti from average to perfect. Great work guys.

Michael
Back to top
barracuda



Joined: 12 May 2006
Posts: 9

PostPosted: Wed Aug 23, 2006 10:59 am    Post subject: Color of font in drop down list Reply with quote

I've implemented the 327 color list from this thread ( with the sorting ), but you can't read the hex on darker colors because of the font color being black.

How can you change the color of the font for the hex number on the color list?
Or is this done through code?


Any help on this would be appreciated. Thanks.
Back to top
dennett



Joined: 21 Aug 2006
Posts: 3

PostPosted: Wed Sep 06, 2006 9:18 pm    Post subject: Cacti Colours Reply with quote

Thanks guys,

A simple but very useful change.

Great work!
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12206
Location: Muenster, Germany

PostPosted: Fri Dec 29, 2006 1:44 pm    Post subject: Reply with quote

Find some of my ideas for a solution here: http://forums.cacti.net/viewtopic.php?t=18869
Reinhard
Back to top
carolina



Joined: 19 Oct 2008
Posts: 4
Location: home or telkom

PostPosted: Sun Oct 19, 2008 5:53 am    Post subject: Reply with quote

wow, very useful, makes my graph more colourful than before..
thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group