Colors are very important in application development on both displaying and editing/analyzing operations. All images (pictures, photos, drawings, icons, emojis, all UI elements …) are consist of pixels in colors. You just need to change the colors of a pixel to draw a beautiful drawing or to edit a photo. You can set your drawings, bitmaps, images, you can create colorful BMP, JPG, PNG pictures, you can edit or analyze photos, you can analyze videos or camera buffer images in realtime operations. C++ Builder is very good and faster on these pixel operations in Colors. This feature is very important on dynamic operations to reduce time of analyze or edition. In this post we present how to use Colors in Modern C++.
TAlphaColorRec
TAlphaColorRec provides access to the color channels record. You can get colors by these variables you can read or write each ARGB values in this variable. By changing Alpha parameter you can make your photos semi transparent by its value.
Some Examples to ARGB colors
0x00000000 Fully transparent black
0x88000000 Half transparent black
0xFF000000 Black
0xFFFFFFFF White
TColorRec
The TColorRec type defines useful constants identifying different types of colors for TColor. Some of these constants map directly to the closest matching color in the system palette (for example, the Blue constant maps to the blue color). You can see the actual colors themselves in the Colors table in TColorRec.