Wednesday, April 12, 2006

Pref.txt - color combinations

Have you ever looked inside pref.txt at the settings for the Data, Heading and Totals colors? Have you wondered what color combinations you should use? If you are like me and you said yes, this posting is for you.

Here are the defaults that you will see inside pref.txt:

Data Format: foreground="0,0,0" background="255,255,255"
Heading Format: foreground="0,0,0" background="247,247,231"
Totals Format: foreground="0,0,0" background="247,247,231"

But what do these mean? Well, the three sets of numbers are the R-G-B (Red, Green, Blue) combinations. In the following illustrations you will find the most common used background color combinations. Most of these are displayed with a foreground color of black (0,0,0) but a few use white (255,255,255) as the foreground to show the contrast.

By the way, if you have also wondered about the colors that Discoverer uses to highlight areas of the screen, to work out the highlight color you subtract the R-G-B number from 255 and use that. So, for example, let's say your data color is Aquamarine, which is 127,255,212, the highlight color will be 128,0,43.

You will find pref.txt located at $ORACLE_HOME\Discoverer\util









6 comments:

Jose said...

Thanks for the info, I find it very useful. Do you know if based on one cell result I could color another cell in discoverer?.
I know you have the "Exceptions" tool to format a cell based on its value but is there any way of programmatically change the format of other cell based on the cell value you are looking at?
Greetings from Edinburgh
Jose

Michael said...

Hi Jose
No, this is not possible. You cannot color one cell based on the content or otherwise of another cell. You can only color a cell based on the value within that cell.

Michael

Arty Borulia said...

Hi Michael.
Do you know if I can use Data, Heading and Totals Format in Discoverer 11g?

Arty Borulia said...

Hi Michael.
Do you know if I can use Data, Heading and Totals Format parameters in 11g pref.txt

Thanks a lot,
Arty

Arty Borulia said...

Hi Michael.
Do you know if I can use Data, Heading and Totals Format parameters in 11g pref.txt

Thanks a lot,
Arty

Michael said...

You can but you may need to add the relevant headings as Oracle removed many of them from the default 11g pref.txt

Followers