Knowledge Base >> Change Display Color of Database Instance

Change Display Color of Database Instance - Confio Article 1536

Confio Article: 1536 Published: Feb 04 2009 4:14 AM
Version: >=4.3 Topic(s): Install and Setup
Product(s): Ignite
Database(s): All

Sometimes the colors that Ignite chooses for a database instance is similar to the color chosen for other instances.  This happens because the color is chosen based on the name of the host and instance which is similar in many environments due to naming standards.

Follow these steps to change the display color for a database instance:

 

1) Go to the main page of Ignite

2) Click the "Options" link

3) On the Options page, click the "Database Query Tool" link

4) Enter in the following query and click the "Execute Query" button:

    select NAME from COND;

5) Note the name for the database instance that you want to recolor.

6) Type in the following statement but substitute the name for 'MYINSTANCE_MYHOST' and substitute in the color of your choice for "33023".  See below for color codes.  Then click the "Execute Query" button. If running Ignite 4.3 or below then for SQL Server or DB2 databases that contain a ‘\’ in their NAME, remove this backslash when entering it as ‘MYINSTANCE_MYHOST’.

    --Use this for version Ignite Version 4.3 or below

    insert into CON_COLOR (DBID, TEXTSTRING, COLOR) values (0,'MYINSTANCE_MYHOST',33023);

   --Use this for version Ignite Version 7.0 or above

    insert into CON_COLOR (TEXTSTRING, COLOR)  values ('MYINSTANCE_MYHOST',33023);

FINAL STEP)  Wait one minute so Ignite will reload the new colors, then go back to the "Options" page and click "Clear Ignite Chart Cache"

 

Color Codes

Below are some common color codes that can be used:

 

COLOR                        NUMBER
Black                           0
White                           16777215
Red                              230
Orange                         33023
Yellow                          65535
Green                           2534179
Blue                             16711680
Purple                          16718476
Cyan                            16776960
Magenta                       16711935
Light Gray                     12632256
Dark Gray                     4210752

Gray                             8421504

 

The numbers are a BGR value (reversed endian of RGB). The formula for RGB to BGR is:
 
(blue*65536) + (green*256) + red;

 

The following link can be used to generate other colors and determine the BGR value:

http://www.sudop.cz/kotor/rgb2bgr/rgb2bgr.php