Q6001019. Creating color palettes for ChartFX for .NET
This article describes how to create color palettes for use in any ChartFX for .NET product. To create a palette you will have to create a txt file that follows our color palette syntax, compile this palette (or multiple palettes) into a .resources file and finally you will have to set this palette using the Palette property.
A color palette is a text file composed by a physical palette (a list of 49 RGB colors) followed by one or more logical palettes (a list of indexes in the physical palette that specifies the default settings for series, labels, axes, etc.), any line that starts with a semicolon is considered a comment and ignored by our parser.
R0,G0,B0
R1,G1,B1
...
R48,G48,B48
SubPaletteName.
S0
S1
...
S15
Background
Alternate Background (used in gradients)
Inside
Border
AxesAndGridLines
Axes Alternate (used in Interlaced mode)
ConstantLines
Stripes
Labels
PointLabels
MarkerBorder
TitlesText
Legend
LegendBackground
DataEditorBackground (background of the cells in the data editor)
DataEditorText
DataEditorAlternateBackground
DataEditorAlternateText
DataEditorTitlesBackground
DataEditorTItlesText
DataEditorGridLines
DataBackgound (background of the data editor)
Note that
R[i],G[i],B[i] is the definition for color i in your palette, each of these items should be a number between 0 and 255
SubPaletteName is the name of the subpalette, note that this line SHOULD end with a period. This allows you to have multiple subpalettes that share the same physical palette
A logical color is a number between 0 and 48 (one of your physical colors) or a predefined color.
S[i] is the definition for the default color for series i. This should be a logical color.
- PhysicalPath is the fully qualified name of the palette file.
- PaletteName is the name of the palette (including the pal extension).
- SubPalette is the name of the subpalette defined inside the pal file.