TdxAlphaColors Record
Stores TdxAlphaColor equivalents of predefined TColor constants and implements auxiliary color-related methods.
#Declaration
TdxAlphaColors = record
#Remarks
The TdxAlphaColors
record contains TdxAlphaColor constants and declares multiple color-related utility methods.
#How to Use TdxAlphaColors
- Add the dxCoreGraphics unit to the uses clause of your project (in Delphi) or include the dxCoreGraphics header to the required source code file (in C++Builder).
- Use the
TdxAlphaColors
type name together with a scope resolution token (.
in Delphi or::
in C++Builder) followed by the required API member. For example, write TdxAlphaColors.Default (in Delphi) or TdxAlphaColors::Default (in C++Builder) to use the default (skin-determined) TdxAlphaColor value in your code.
#Main API Members
The list below outlines key members of the TdxAlphaColors
record. These members allow you to use TdxAlphaColor equivalents of corresponding TColor constants for all DevExpress controls that use transparent colors.
#Predefined Colors
This section contains all predefined color constants declared in the TdxAlphaColors
record. Click Standard Colors, Web Colors, or System Colors below to view corresponding TdxAlphaColor palettes.
Note
All Tdx255
($FF
)).
To create colors with a custom transparency, pass the corresponding constants as a parameter to the Tdx
Refer to the following section for details: Global Tdx
The following table lists TdxAlphaColor counterparts of TColor values found in the Normal Colors VCL palette:
Tdx |
Hexadecimal | Color Fill Swatch | TColor |
---|---|---|---|
Tdx |
$FF000000 |
![]() |
cl |
Tdx |
$FF000080 |
![]() |
cl |
Tdx |
$FF008000 |
![]() |
cl |
Tdx |
$FF008080 |
![]() |
cl |
Tdx |
$FF800000 |
![]() |
cl |
Tdx |
$FF800080 |
![]() |
cl |
Tdx |
$FF808000 |
![]() |
cl |
Tdx |
$FF808080 |
![]() |
cl |
Tdx |
$FFC0C0C0 |
![]() |
cl |
Tdx |
$FF0000FF |
![]() |
cl |
Tdx |
$FF00FF00 |
![]() |
cl |
Tdx |
$FF00FFFF |
![]() |
cl |
Tdx |
$FFFF0000 |
![]() |
cl |
Tdx |
$FFFF00FF |
![]() |
cl |
Tdx |
$FFFFFF00 |
![]() |
cl |
Tdx |
$FFFFFFFF |
![]() |
cl |
Tdx |
$FFF0CAA6 |
![]() |
cl |
The following table lists TdxAlphaColor
equivalents of all TColor values found in the Web Named Color VCL palette:
Tdx |
Hexadecimal | Color Fill Swatch | TColor |
---|---|---|---|
Tdx |
$FFFAFAFF |
![]() |
cl |
Tdx |
$FFF0FAFF |
![]() |
cl |
Tdx |
$FFF5F0FF |
![]() |
cl |
Tdx |
$FFE6F5FD |
![]() |
cl |
Tdx |
$FFF0FFFF |
![]() |
cl |
Tdx |
$FFDCF8FF |
![]() |
cl |
Tdx |
$FFDCF5F5 |
![]() |
cl |
Tdx |
$FFD7EBFA |
![]() |
cl |
Tdx |
$FFB3DEF5 |
![]() |
cl |
Tdx |
$FFFFF8F0 |
![]() |
cl |
Tdx |
$FFFFF8F8 |
![]() |
cl |
Tdx |
$FFFAE6E6 |
![]() |
cl |
Tdx |
$FFEEF5FF |
![]() |
cl |
Tdx |
$FFE0FFFF |
![]() |
cl |
Tdx |
$FFD5EFFF |
![]() |
cl |
Tdx |
$FFADDEFF |
![]() |
cl |
Tdx |
$FFB5E4FF |
![]() |
cl |
Tdx |
$FF87B8DE |
![]() |
cl |
Tdx |
$FFFFFFF0 |
![]() |
cl |
Tdx |
$FFFAFFF5 |
![]() |
cl |
Tdx |
$FFF0FFF0 |
![]() |
cl |
Tdx |
$FFFAF0E6 |
![]() |
cl |
Tdx |
$FFCDFAFF |
![]() |
cl |
Tdx |
$FFCDEBFF |
![]() |
cl |
Tdx |
$FFC4E4FF |
![]() |
cl |
Tdx |
$FFB9DAFF |
![]() |
cl |
Tdx |
$FF8CB4D2 |
![]() |
cl |
Tdx |
$FF00FFFF |
![]() |
cl |
Tdx |
$FF008CFF |
![]() |
cl |
Tdx |
$FF0000FF |
![]() |
cl |
Tdx |
$FF00008B |
![]() |
cl |
Tdx |
$FF000080 |
![]() |
cl |
Tdx |
$FF5C5CCD |
![]() |
cl |
Tdx |
$FF7280FA |
![]() |
cl |
Tdx |
$FF507FFF |
![]() |
cl |
Tdx |
$FF00D7FF |
![]() |
cl |
Tdx |
$FF4763FF |
![]() |
cl |
Tdx |
$FF3C14DC |
![]() |
cl |
Tdx |
$FF2A2AA5 |
![]() |
cl |
Tdx |
$FF1E69D2 |
![]() |
cl |
Tdx |
$FF60A4F4 |
![]() |
cl |
Tdx |
$FF7AA0FF |
![]() |
cl |
Tdx |
$FF8080F0 |
![]() |
cl |
Tdx |
$FF00A5FF |
![]() |
cl |
Tdx |
$FF0045FF |
![]() |
cl |
Tdx |
$FF2222B2 |
![]() |
cl |
Tdx |
$FF13458B |
![]() |
cl |
Tdx |
$FF2D52A0 |
![]() |
cl |
Tdx |
$FF3F85CD |
![]() |
cl |
Tdx |
$FF7A96E9 |
![]() |
cl |
Tdx |
$FF8F8FBC |
![]() |
cl |
Tdx |
$FFAAE8EE |
![]() |
cl |
Tdx |
$FFD2FAFA |
![]() |
cl |
Tdx |
$FF008080 |
![]() |
cl |
Tdx |
$FF228B22 |
![]() |
cl |
Tdx |
$FF2FFFAD |
![]() |
cl |
Tdx |
$FF00FF7F |
![]() |
cl |
Tdx |
$FF90EE90 |
![]() |
cl |
Tdx |
$FFD4FF7F |
![]() |
cl |
Tdx |
$FF578B2E |
![]() |
cl |
Tdx |
$FF20A5DA |
![]() |
cl |
Tdx |
$FF8CE6F0 |
![]() |
cl |
Tdx |
$FF238E6B |
![]() |
cl |
Tdx |
$FF008000 |
![]() |
cl |
Tdx |
$FF32CD9A |
![]() |
cl |
Tdx |
$FF00FC7C |
![]() |
cl |
Tdx |
$FF98FB98 |
![]() |
cl |
Tdx |
$FFAACD66 |
![]() |
cl |
Tdx |
$FF71B33C |
![]() |
cl |
Tdx |
$FF0B86B8 |
![]() |
cl |
Tdx |
$FF6BB7BD |
![]() |
cl |
Tdx |
$FF2F6B55 |
![]() |
cl |
Tdx |
$FF006400 |
![]() |
cl |
Tdx |
$FF32CD32 |
![]() |
cl |
Tdx |
$FF00FF00 |
![]() |
cl |
Tdx |
$FF7FFF00 |
![]() |
cl |
Tdx |
$FF9AFA00 |
![]() |
cl |
Tdx |
$FF8FBC8F |
![]() |
cl |
Tdx |
$FFAAB220 |
![]() |
cl |
Tdx |
$FFEEEEAF |
![]() |
cl |
Tdx |
$FFFFFFE0 |
![]() |
cl |
Tdx |
$FFE6D8AD |
![]() |
cl |
Tdx |
$FFFACE87 |
![]() |
cl |
Tdx |
$FFED9564 |
![]() |
cl |
Tdx |
$FF8B0000 |
![]() |
cl |
Tdx |
$FF82004B |
![]() |
cl |
Tdx |
$FFCCD148 |
![]() |
cl |
Tdx |
$FFD0E040 |
![]() |
cl |
Tdx |
$FFFFFF00 |
![]() |
cl |
Tdx |
$FFE6E0B0 |
![]() |
cl |
Tdx |
$FFEBCE87 |
![]() |
cl |
Tdx |
$FFE16941 |
![]() |
cl |
Tdx |
$FFCD0000 |
![]() |
cl |
Tdx |
$FF701919 |
![]() |
cl |
Tdx |
$FFD1CE00 |
![]() |
cl |
Tdx |
$FFA09E5F |
![]() |
cl |
Tdx |
$FF8B8B00 |
![]() |
cl |
Tdx |
$FF808000 |
![]() |
cl |
Tdx |
$FFFFBF00 |
![]() |
cl |
Tdx |
$FFFF901E |
![]() |
cl |
Tdx |
$FFFF0000 |
![]() |
cl |
Tdx |
$FF800000 |
![]() |
cl |
Tdx |
$FFD30094 |
![]() |
cl |
Tdx |
$FFCC3299 |
![]() |
cl |
Tdx |
$FFFF00FF |
![]() |
cl |
Tdx |
$FF8B008B |
![]() |
cl |
Tdx |
$FF8515C7 |
![]() |
cl |
Tdx |
$FF9370DB |
![]() |
cl |
Tdx |
$FFE22B8A |
![]() |
cl |
Tdx |
$FFD355BA |
![]() |
cl |
Tdx |
$FFDB7093 |
![]() |
cl |
Tdx |
$FF800080 |
![]() |
cl |
Tdx |
$FF9314FF |
![]() |
cl |
Tdx |
$FFC1B6FF |
![]() |
cl |
Tdx |
$FFEE82EE |
![]() |
cl |
Tdx |
$FFD670DA |
![]() |
cl |
Tdx |
$FFDDA0DD |
![]() |
cl |
Tdx |
$FFD8BFD8 |
![]() |
cl |
Tdx |
$FFB469FF |
![]() |
cl |
Tdx |
$FFCBC0FF |
![]() |
cl |
Tdx |
$FFDEC4B0 |
![]() |
cl |
Tdx |
$FFEE687B |
![]() |
cl |
Tdx |
$FF998877 |
![]() |
cl |
Tdx |
$FFFFFFFF |
![]() |
cl |
Tdx |
$FFD3D3D3 |
![]() |
cl |
Tdx |
$FF808080 |
![]() |
cl |
Tdx |
$FFB48246 |
![]() |
cl |
Tdx |
$FFCD5A6A |
![]() |
cl |
Tdx |
$FF908070 |
![]() |
cl |
Tdx |
$FFF5F5F5 |
![]() |
cl |
Tdx |
$FFC0C0C0 |
![]() |
cl |
Tdx |
$FF696969 |
![]() |
cl |
Tdx |
$FFE1E4FF |
![]() |
cl |
Tdx |
$FF8B3D48 |
![]() |
cl |
Tdx |
$FF4F4F2F |
![]() |
cl |
Tdx |
$FFDCDCDC |
![]() |
cl |
Tdx |
$FFA9A9A9 |
![]() |
cl |
Tdx |
$FF000000 |
![]() |
cl |
The following table lists all class functions that return TdxAlphaColor counterparts of colors defined in the Windows Control panel:
Tdx |
TColor | Description |
---|---|---|
Tdx |
cl |
The active window border color. |
Tdx |
cl |
The active window title bar color. |
Tdx |
cl |
The current application workspace color. |
Tdx |
cl |
The Windows desktop background color. |
Tdx |
cl |
The button face color. |
Tdx |
cl |
The button highlight color. |
Tdx |
cl |
The button shadow color. |
Tdx |
cl |
The button caption color. |
Tdx |
cl |
The active window title text color. |
Tdx |
cl |
The end point of the gradient used to fill the title bar of the active window in Windows 2000. Used for backward compatibility only. |
Tdx |
cl |
The end point of the gradient used to fill title bars of inactive windows in Windows 2000. Used for backward compatibility only. |
Tdx |
cl |
The dimmed text color. |
Tdx |
cl |
The selected text color. |
Tdx |
cl |
The hot-track effect color. |
Tdx |
cl |
The border color for inactive windows. |
Tdx |
cl |
The title text color for inactive windows. |
Tdx |
cl |
The background color for tooltip controls in Windows 95. Used for backward compatibility only. |
Tdx |
cl |
The text color for tooltip controls in Window 95. Used for backward compatibility only. |
Tdx |
cl |
The menu background color. |
Tdx |
cl |
The menu bar color. |
Tdx |
cl |
The menu item highlight color. |
Tdx |
cl |
The menu text color. |
Tdx |
cl |
The scroll bar track color. |
Tdx |
cl3DDk |
The dark shadow color for UI elements with 3D effects in Windows 95. Used for backward compatibility only. |
Tdx |
cl3DLight |
The light color for UI elements with 3D effects in Windows 95. Used for backward compatibility only. |
Tdx |
cl |
The window background color. |
Tdx |
cl |
The window frame color. |
Tdx |
cl |
The window text color. |
#Special Colors
- Default
- Stores the default TdxAlphaColor value that corresponds to a skin-determined color.
- Empty
- An empty TdxAlphaColor constant whose alpha and color values are set to zero.
- Transparent
- Stores the transparent TdxAlphaColor value (corresponds to the white color with zero alpha).
#Auxiliary Functions
- Alpha | B | G | R
- Return corresponding color channel values (from
0
to255
) for a specified TdxAlphaColor. - Blend
- Blends two TdxAlphaColor values (foreground and background colors) to create an opaque color.
- CalculateNearestColor
- Uses the HSL (HSB) color model to compare a specified color to all colors in a palette and returns the most similar color.
- ChangeBrightness
- Creates a new TdxAlphaColor value based on a specified color and the required brightness value (from
0.0
to1.0
). - GetBrightness | GetHue | GetSaturation
- Return brightness (lightness), hue, and saturation values (from
0.0
to1.0
) for a specified TdxAlphaColor. - IsEmpty | IsTransparentOrEmpty
- Identify if a specified color matches the Empty or Transparent special color.
#Color Conversion Functions
- FromArgb
- Creates a TdxAlphaColor from specified individual component values.
- FromColor
- Converts a TColor value to TdxAlphaColor (opaque).
- FromHSL
- Creates a TdxAlphaColor from hue, saturation, and brightness (lightness) values (from
0.0
to1.0
). - FromHTML
- Converts a hexadecimal HTML color value to TdxAlphaColor (opaque).
- ToColor
- Converts a TdxAlphaColor value to TColor.
- ToHSL
- Returns hue, saturation, and brightness (lightness) values for a specified [TdxAlphaColor] value.
- ToHTML
- Converts a TdxAlphaColor value to the HTML hexadecimal format.
#Global TdxAlphaColor-Related Methods
In addition to all methods declared in the TdxAlphaColors
record, you can use global color-related methods (also declared in the dxCoreGraphics unit).
#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.