32 Bit Color at RRD-Graphs

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

32 Bit Color at RRD-Graphs

Post by mojiro »

Since that it is fully supported, why not be implemented to cacti ?

With 2 fast modifications, can be supported... it is tested and it is working nice

MySQL Table
database->table->field->property=value
cactidb->colors->hex->length=8

PHP Code
cactidir/include/config_form.php

original

Code: Select all

/* file: color.php, action: edit */
$fields_color_edit = array(
        "hex" => array(
                "method" => "textbox",
                "friendly_name" => "Hex Value",
                "description" => "The hex value for this color; valid range: 000000-FFFFFF.",
                "value" => "|arg1:hex|",
                "max_length" => "6",
                ),
        "id" => array(
                "method" => "hidden_zero",
                "value" => "|arg1:id|"
                ),
        "save_component_color" => array(
                "method" => "hidden",
                "value" => "1"
                )
        );
modificated

Code: Select all

/* file: color.php, action: edit */
$fields_color_edit = array(
        "hex" => array(
                "method" => "textbox",
                "friendly_name" => "Hex Value",
                "description" => "The hex value for this color; valid range: 00000000-FFFFFFFF.",
                "value" => "|arg1:hex|",
                "max_length" => "8",
                ),
        "id" => array(
                "method" => "hidden_zero",
                "value" => "|arg1:id|"
                ),
        "save_component_color" => array(
                "method" => "hidden",
                "value" => "1"
                )
        );
changes

Code: Select all

"description" => "The hex value for this color; valid range: 00000000-FFFFFFFF.",
"max_length" => "8",
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What are we talking about here, could it be:

RRGGBBAA?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

TheWitness wrote:What are we talking about here, could it be:

RRGGBBAA?

TheWitness
yap!!!
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

test
Attachments
alpha.PNG
alpha.PNG (31.09 KiB) Viewed 7546 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Looks pretty good.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I actually had that coded up for both rrdtool 1.2.x and rrdtool 1.0.x. Of course, this does not work with RRDtool 1.0.x.. :(

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

where I can find 32 bit color list?
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

sizulku wrote:where I can find 32 bit color list?
the difference between 24bit color and 32bit color is the Alpha Channel
also known as Transparency level.

if a 24bit color code looks like #ff0000 (red) then ff = 255, 00 = 0, 00 = 0.
adding two more hex digits at the end of a 24bit color code it is being
converted to 32bit color code, that supports Transparency.

Transparency level, takes values from 00 to ff, where 00 is invisible
and ff is visible.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests