Hello. I am working on TwinCAT 3 visualization.
I want to fill the colour of a rectangle in the visualization using Fill colour . The variable I defines is an array of DINT which includes different colour codes. By implementing different condition
I want to know How can I get the light green colour using 16#TTRRGGBB or 16#FF8FE03F ? I mean i can get red colour using this value 16711680, hex value= FF0000. But How to get light green colour? Can someone explain me about how colour variables work in TwinCAT 3. I have also added the explanation below.
Thanks in advance.
Regards
Color variables
The color variables used for dynamic definition of the element colors via project variables of type DWORD. A color is defined based on a hexadecimal number consisting of red, green and blue (RGB) components. In addition, the variables are used to specify the transparency of the color (FF: fully opaque - 00: fully transparent). The DWORD has the following structure: 16#TTRRGGBB
Note
The structure of the hexadecimal number differs, compared to TwinCAT 2. In TwinCAT 3, in addition to the RGB components, the color transparency can also be defined with the hexadecimal number. The transparency is indicated by the first two digits after “16#”. Colors with definitions starting with “16#00” are invisible, since they are fully transparent.
Example:
nFillColor := 16#FF8FE03F;
▪FF: transparency (fully opaque)
▪8F: red
▪E0: green
▪3F: blue
I want to fill the colour of a rectangle in the visualization using Fill colour . The variable I defines is an array of DINT which includes different colour codes. By implementing different condition
I want to know How can I get the light green colour using 16#TTRRGGBB or 16#FF8FE03F ? I mean i can get red colour using this value 16711680, hex value= FF0000. But How to get light green colour? Can someone explain me about how colour variables work in TwinCAT 3. I have also added the explanation below.
Thanks in advance.
Regards
Color variables
The color variables used for dynamic definition of the element colors via project variables of type DWORD. A color is defined based on a hexadecimal number consisting of red, green and blue (RGB) components. In addition, the variables are used to specify the transparency of the color (FF: fully opaque - 00: fully transparent). The DWORD has the following structure: 16#TTRRGGBB
Note
The structure of the hexadecimal number differs, compared to TwinCAT 2. In TwinCAT 3, in addition to the RGB components, the color transparency can also be defined with the hexadecimal number. The transparency is indicated by the first two digits after “16#”. Colors with definitions starting with “16#00” are invisible, since they are fully transparent.
Example:
nFillColor := 16#FF8FE03F;
▪FF: transparency (fully opaque)
▪8F: red
▪E0: green
▪3F: blue