Jump to content
Software FX Community

Palette


User (Legacy)

Recommended Posts

Hey all,

I've RTFM, and I've tried hacking around, but I can't find any reliable way

to create a new palette. Is there documentation on all the information that

is stored in a palette registry entry?

My hacking around consisted of:

a) Exporting the registry key for palettes

B) Looking for the start of the colors in the registry entry - after the:

"ChartFX 3.0"=hex:c8,00,00,00,00,03,31,00,ff,ff,ff,00,

comes the color entries for this palette, null separated

c) Then, I filled in colors up until the all-black color (00,00,00,00,)

which seems to give me about 47 colors in the palette. After this point in

the entry, information varies from palette to palette except that the

palette ends with 00,01

This all seems ok, except when I chart something using this palette - it

seems to pick random entries from the palette instead of methodically

choosing each color in turn.

So, how does the palette work, how does one define a new palette, and what

is the method to the seeming randomness of the palette I created?

Any hints?

Thanks,

Marc

Link to comment
Share on other sites

Funny,

Searching the KB for this article yields no results.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:M%23KWzV6YEHA.3152@webserver3.softwarefx.com...

> Check out the following KB article in our support site:

>

>

> Q1371038. How to create a new customized Palette.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Attached is the search results I get searching for it.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:M%23KWzV6YEHA.3152@webserver3.softwarefx.com...

> Check out the following KB article in our support site:

>

>

> Q1371038. How to create a new customized Palette.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

I beleive we were looking in diferent sites. I was looking at Chart FX's

Client Server support site.

Here is the article in case you can't find it:

Q1371038. How to create a new customized Palette.

The information on this article applies to

a.. ChartFX Client Server

b.. ChartFX Financial (Desktop)

Summary

If you are looking for a different palette besides the 12 ChartFX colorful

Palettes, you can freely create your own palette.

Basically, the structure of the new palette should be:

typedef struct {

ULONG nSize; // In bytes

WORD nVersion;

WORD nColors;

COLORREF Colors[49];

USHORT nBars; // Color to assign to series by default (16)

ULONG nSize2; // In bytes

COLORREF Bars[16];

} PALETTE;Description

Here is a complete Sample:

#define CHART_PALETTECOLOR 0x01000000L

#define PAL© (CHART_PALETTECOLOR|©)

PALETTE pNature = {

(sizeof(COLORREF)*49)+4, //this portion is constant (it does not change)

0x300,

49,

{

RGB(255,255,255),

RGB(192,215,192),

RGB(191,224,192),

RGB(175,232,176),

RGB(180,213,181),

RGB(159,192,160),

RGB(143,224,143),

RGB(139,210,143),

RGB(152,200,152),

RGB(191,191,191),

RGB(133,178,178),

RGB(120,208,111),

RGB(80,207,79),

RGB(107,173,122),

RGB(95,191,96),

RGB(119,152,119),

RGB(104,140,104),

RGB(95,159,96),

RGB(80,191,80),

RGB(79,175,95),

RGB(75,133,80),

RGB(47,176,64),

RGB(55,152,72),

RGB(16,192,48),

RGB(0,160,63),

RGB(5,138,47),

RGB(0,175,8),

RGB(0,152,0),

RGB(0,136,0),

RGB(96,127,96),

RGB(127,127,127),

RGB(80,112,80),

RGB(72,100,72),

RGB(63,119,64),

RGB(63,87,64) ,

RGB(48,104,48),

RGB(0,119,47),

RGB(0,96,32),

RGB(0,111,32),

RGB(48,77,48),

RGB(37,90,47),

RGB(0,87,47),

RGB(0,123,16),

RGB(0,103,0),

RGB(0,88,24),

RGB(0,76,16),

RGB(31,56,32),

RGB(16,39,31),

RGB(0,0,0),

},

16,

sizeof(COLORREF)*16,

{

PAL(1),

PAL(3),

PAL(5),

PAL(6),

PAL(11),

PAL(15),

PAL(16),

PAL(19),

PAL(21),

PAL(23),

PAL(27),

PAL(29),

PAL(32),

PAL(35),

PAL(38),

PAL(42),

}After you save this code, you should create a new entry on the registry,

either on the Local_Machine or Current_user, located at

SOFTWARE/SOFTWAREFX/PALETTES.

How are the 16 and 49 colors assignments used and are the remaining

unassigned colors used?

The 16 colors are the colors assigned to the series. If there are more than

16 series on the chart the 16 colors will be repeated. The 49 Colors are the

total available colors; you can choose any of these from the palette bar.

--

FP

Software FX

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...