Ugrás a tartalomhoz

.NET Programming Technologies

Gergely Kovásznai, Csaba Biró

Eszterházy Károly College

6. fejezet - Colours and Brushes (written by Biró Csaba)

6. fejezet - Colours and Brushes (written by Biró Csaba)

Color management

First let’s see something about the color management. If you want to create or use your own colors in the applications, you can define them in the following ways.

<Color x:Key="narancssargaSzin" A="255" R="255" G="176" B="59" ></Color>

<Color x:Key="sotetpirosSzin">#FFAA2C27</Color>

In the first case: ARGB - means A(Alpha), R(red), G(Green), and B (Blue) values. The first (alpha) parameter defines the degree of opacity. It means 100 % in our case (value of 255). The other, hexadecimal way beginning with # well known from the web world.

The first two digits: Opacity value (255=100%)

the second two digits: quantity of red colour

the third two digits: quantity of green

the fourth two digits: the amount of blue