Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Working with colors description

Color (red, blue, etc.) has no defined data type. It is possible to specify it by various ways using the String or Long data types.
 
In the PROMOTIC system the color is entered as RGB String the same way as comonly used, for example, in HTML syntax. It is a text beginning with "#" followed by 2 hexadecimal digits for (Red) color compound, then 2 hex digits for (Green) color compound and then 2 hex digits for (Blue) color compound. Schematic "#RRGGBB". For example:
#00ff00 is light green
#ff0000 is red
#d000d0 is purple

Some properties, representing colors, support transparency. In such case instead of RGB String the word transparent can be used. It is usually used for graphic items background color, e.g. PmiPanel.ColorItem.

 
For color transformation the folowing methods can be used:
- Pm.ColorOper: Various operations with defined color
- Pm.ColorRgb: Getting the RGB String color by entering the three RGB components.
 
Colors can be set/read from properties of many graphics objects. For example PmiText.ColorText, PmiPanel.ColorItem, PmiBar.BarColor, PmiButton.ColorText, PmiPipe.ColorItem, PmiRectangle.ColorBorder, PmiEllipse.ColorItem, tvGraph.Color, PmForm.BgColor, PmTable.SetCellBackColor.
 

Examples of colors

RGB String: Color: Appearance:
#000000 black  
#404040 dark gray  
#808080 gray  
#c0c0c0 light gray  
#ffffff white  
#000058 dark blue  
#0000d0 blue  
#a8ccf0 light blue  
#306666 dark cyan  
#009898 cyan  
#c0dcc0 light cyan  
#004400 dark green  
#00ac00 green  
#00ff00 light green  
#a80000 dark red  
#ff0000 red  
#ff6868 light red  
#776800 orange  
#680068 dark magenta  
#d000d0 magenta  
#ff98ff light magenta  
#800000 brown  
#ffff00 yellow  
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice