TdxAlphaColor Type
A 4-byte unsigned integer that stores red, green, blue, and alpha (opacity) color component values (from 0
to 255
).
#Declaration
TdxAlphaColor = type System.Types.DWORD;
#Referenced Class
Type | Description |
---|---|
DWORD | A 4-byte unsigned integer value that stores color components in ARGB (Alpha, Red, Green, and Blue) format. This color format corresponds to the ARGB color mapping in GDI+. |
#Remarks
TdxAlphaColor
is a TColor counterpart with support for transparency. All DevExpress components that allow you to specify transparent colors use this type.
#How to Use TdxAlphaColor
All DevExpress controls that use TdxAlphaColor
for UI element or content colors[1], automatically add the dxCoreGraphics unit to the project (no action is necessary).
If you need to use TdxAlphaColor
or other color-related DevExpress types and methods in a project without such controls, add the dxCoreGraphics unit to the uses clause (in Delphi) or include the dxCoreGraphics header (HPP) to the required source code file (in C++Builder).
#Useful TdxAlphaColor-Related APIs
The TdxAlphaColors record contains multiple TdxAlphaColor
constants and declares multiple color-related utility methods.
In addition, you can call the following global methods (also declared in the dxCoreGraphics unit) to work with TdxAlphaColor
values:
#Conversion Methods
- dxAlphaColorToColor(dxCoreGraphics.TdxAlphaColor)
- dxAlphaColorToColor(dxCoreGraphics.TdxAlphaColor,System.Byte)
- Converts a specified TdxAlphaColor value to the TColor type.
- dxAlphaColorToRGBQuad
- Converts a specified TdxAlphaColor value to the TRGBQuad type.
- dxColorToAlphaColor
- Converts a specified TColor value to the TdxAlphaColor type.
- dxColorToRGBQuad
- Converts a specified TColor value to the TRGBQuad type.
- dxMakeAlphaColor(System.Byte,System.Byte,System.Byte)
- dxMakeAlphaColor(System.Byte,System.Byte,System.Byte,System.Byte)
- dxMakeAlphaColor(Vcl.Graphics.TColor,System.Byte)
- Creates a TdxAlphaColor value from individual color component values and returns it as the function’s result.
- dxRGBQuadToColor
- Converts a specified TRGBQuad value to the TColor type.
#Utility Methods
- dxGetAlpha
- Extracts the alpha value (also called transparency level) from a specified color.
- dxGetBlue
- Extracts the blue color component value from a specified color.
- dxGetGreen
- Extracts the green color component value from a specified color.
- dxGetRed
- Extracts the red color component value from a specified color.
-
TdxChartControl, for example.