Defining Color Palettes

  1. Defining Color Palettes
    1. Introduction
    2. System Colors
    3. User Fixed Colors
    4. Computed Colors
    5. Interpolated Colors


Whenever you have to specify colors for a style, in any kind of representation supported by Sirius, you can use either one of the pre-defined system colors or one which you have defined yourself in a Users Color Palette. The palette is created directly inside the Viewpoint element, and its colors can be used by any representation.

You can define three different kind of colors inside a palette:

All have a name, which should be unique. It is useful to give semantic names to the colors (i.e. «Software System» instead of «Navy Blue») so that they can be easily used consistently across all your representations. This way if you decide to change to color used for some kind of element you can be sure the new color will be applied everywhere.

System Colors

System colors are not defined in your palette, but are always available.

User Fixed Colors

User Fixed Colors are the simplest: they are simply defined by fixed integer values for their Red, Green and Blue components. All components values must be between 0 and 255. You can either specify them numerically or using a color wheel.

Computed Colors

Computed color have RGB components values which are dynamically computed. You must specify one expression for each of the Red, Green and Blue components. They will be evaluated in the context of the semantic target element of the graphical element where the color is used. The expressions should return a number between 0 and 255.

Interpolated Colors

This element is used to specify a custom color which create dynamically a color between two or more Color Steps. Those Color Steps are defined as children of the Interpolated Color.

Each Color Step associates a color (from the palette) with a numerical Associated Value (which can be computed). The successive color steps in an interpolated color should have increasing associated values.

The Interpolated Color itself has a Color Value Computation Expression, which should return a numeric value.