View Source

When creating mimic parameters it is often desirable to add a default value.&nbsp; This default value is just a 'value', not an expression.
&nbsp;
When creating a "ViewXColour" parameter, you cannot enter 'RGB( 0, 0, 255)' for example as this would normally be an expression.&nbsp; This will be evaluated as a string value of 'RGB( 0, 0, 255)' which would then return a Type Mismatch if used in a color animation.&nbsp; You should specify the color as a number e.g. 16711680 (0xFF0000) for blue.

To determine the decimal value of a color takes a few steps but is fairly simple.
&nbsp;
* The first step is to find the RGB values of the color you require.&nbsp; These values can be obtained from the advanced color palette within ClearSCADA.&nbsp; In the example below, the RGB values are 51, 208 and 47.
\\
\\ !Color Palette.JPG|align=center!
&nbsp;
\\
\\
\\
* Once you have the RGB values, convert them to hex and reverse append them.&nbsp; (Converting these numbers can be done using the Windows Calculator).

* &nbsp;Now convert the number from hex to decimal.

* This is the value that should be entered for the parameters default value.
\\

For example, we will convert a green color into its decimal format for the color parameter.

The RGB color number for the green chosen is (128,255,128).&nbsp; The hex conversion for 128 is 80 and for 255 is FF.&nbsp; Reverse appending the numbers gives us 80FF80.&nbsp; Converted to decimal, this gives our color parameter default value of 8454016.

Tip:
If you want to 'build' a color for ClearSCADA, which can also be used with SQL, then you can use this method.
For example to create the colour with these three numbers:
Red = 10
Green = 20
Blue = 30

Your application needs to use the expression/number like this:

(10 + 20*256 + 30*256*256)

So just substitute 10,20,30 with your Red, Green and Blue decimal values.