Back to Devexpress

TdxAlphaColors Record

vcl-dxcoregraphics-8dbbc076.md

latest46.5 KB
Original Source

TdxAlphaColors Record

Stores TdxAlphaColor equivalents of predefined TColor constants and implements auxiliary color-related methods.

Declaration

delphi
TdxAlphaColors = record

Remarks

The TdxAlphaColors record contains TdxAlphaColor constants and declares multiple color-related utility methods.

How to Use TdxAlphaColors

  1. 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).
  2. 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 TdxAlphaColor values in this section are opaque (their alpha value is 255 ($FF)).

To create colors with a custom transparency, pass the corresponding constants as a parameter to the TdxAlphaColors.FromArgb function or use other auxiliary color-related functions declared in the dxCoreGraphics unit.

Refer to the following section for details: Global TdxAlphaColor-Related Methods.

Standard Colors

The following table lists TdxAlphaColor counterparts of TColor values found in the Normal Colors VCL palette:

TdxAlphaColorHexadecimalColor Fill SwatchTColor
TdxAlphaColors.Black$FF000000clBlack
TdxAlphaColors.Maroon$FF000080clMaroon
TdxAlphaColors.Green$FF008000clGreen
TdxAlphaColors.Olive$FF008080clOlive
TdxAlphaColors.Navy$FF800000clNavy
TdxAlphaColors.Purple$FF800080clPurple
TdxAlphaColors.Teal$FF808000clTeal
TdxAlphaColors.Gray$FF808080clGray
TdxAlphaColors.Silver$FFC0C0C0clSilver
TdxAlphaColors.Red$FF0000FFclRed
TdxAlphaColors.Lime$FF00FF00clLime
TdxAlphaColors.Yellow$FF00FFFFclYellow
TdxAlphaColors.Blue$FFFF0000clBlue
TdxAlphaColors.Fuchsia$FFFF00FFclFuchsia
TdxAlphaColors.Aqua$FFFFFF00clAqua
TdxAlphaColors.White$FFFFFFFFclWhite
TdxAlphaColors.SkyBlue$FFF0CAA6clSkyBlue

Web Colors

The following table lists TdxAlphaColor equivalents of all TColor values found in the Web Named Color VCL palette:

TdxAlphaColorHexadecimalColor Fill SwatchTColor
TdxAlphaColors.Snow$FFFAFAFFclWebSnow
TdxAlphaColors.FloralWhite$FFF0FAFFclWebFloralWhite
TdxAlphaColors.LavenderBlush$FFF5F0FFclWebLavenderBlush
TdxAlphaColors.OldLace$FFE6F5FDclWebOldLace
TdxAlphaColors.Ivory$FFF0FFFFclWebIvory
TdxAlphaColors.Cornsilk$FFDCF8FFclWebCornSilk
TdxAlphaColors.Beige$FFDCF5F5clWebBeige
TdxAlphaColors.AntiqueWhite$FFD7EBFAclWebAntiqueWhite
TdxAlphaColors.Wheat$FFB3DEF5clWebWheat
TdxAlphaColors.AliceBlue$FFFFF8F0clWebAliceBlue
TdxAlphaColors.GhostWhite$FFFFF8F8clWebGhostWhite
TdxAlphaColors.Lavender$FFFAE6E6clWebLavender
TdxAlphaColors.SeaShell$FFEEF5FFclWebSeashell
TdxAlphaColors.LightYellow$FFE0FFFFclWebLightYellow
TdxAlphaColors.PapayaWhip$FFD5EFFFclWebPapayaWhip
TdxAlphaColors.NavajoWhite$FFADDEFFclWebNavajoWhite
TdxAlphaColors.Moccasin$FFB5E4FFclWebMoccasin
TdxAlphaColors.BurlyWood$FF87B8DEclWebBurlywood
TdxAlphaColors.Azure$FFFFFFF0clWebAzure
TdxAlphaColors.MintCream$FFFAFFF5clWebMintcream
TdxAlphaColors.Honeydew$FFF0FFF0clWebHoneydew
TdxAlphaColors.Linen$FFFAF0E6clWebLinen
TdxAlphaColors.LemonChiffon$FFCDFAFFclWebLemonChiffon
TdxAlphaColors.BlanchedAlmond$FFCDEBFFclWebBlanchedAlmond
TdxAlphaColors.Bisque$FFC4E4FFclWebBisque
TdxAlphaColors.PeachPuff$FFB9DAFFclWebPeachPuff
TdxAlphaColors.Tan$FF8CB4D2clWebTan
TdxAlphaColors.Yellow$FF00FFFFclWebYellow
TdxAlphaColors.DarkOrange$FF008CFFclWebDarkOrange
TdxAlphaColors.Red$FF0000FFclWebRed
TdxAlphaColors.DarkRed$FF00008BclWebDarkRed
TdxAlphaColors.Maroon$FF000080clWebMaroon
TdxAlphaColors.IndianRed$FF5C5CCDclWebIndianRed
TdxAlphaColors.Salmon$FF7280FAclWebSalmon
TdxAlphaColors.Coral$FF507FFFclWebCoral
TdxAlphaColors.Gold$FF00D7FFclWebGold
TdxAlphaColors.Tomato$FF4763FFclWebTomato
TdxAlphaColors.Crimson$FF3C14DCclWebCrimson
TdxAlphaColors.Brown$FF2A2AA5clWebBrown
TdxAlphaColors.Chocolate$FF1E69D2clWebChocolate
TdxAlphaColors.SandyBrown$FF60A4F4clWebSandyBrown
TdxAlphaColors.LightSalmon$FF7AA0FFclWebLightSalmon
TdxAlphaColors.LightCoral$FF8080F0clWebLightCoral
TdxAlphaColors.Orange$FF00A5FFclWebOrange
TdxAlphaColors.OrangeRed$FF0045FFclWebOrangeRed
TdxAlphaColors.Firebrick$FF2222B2clWebFirebrick
TdxAlphaColors.SaddleBrown$FF13458BclWebSaddleBrown
TdxAlphaColors.Sienna$FF2D52A0clWebSienna
TdxAlphaColors.Peru$FF3F85CDclWebPeru
TdxAlphaColors.DarkSalmon$FF7A96E9clWebDarkSalmon
TdxAlphaColors.RosyBrown$FF8F8FBCclWebRosyBrown
TdxAlphaColors.PaleGoldenrod$FFAAE8EEclWebPaleGoldenrod
TdxAlphaColors.LightGoldenrodYellow$FFD2FAFAclWebLightGoldenrodYellow
TdxAlphaColors.Olive$FF008080clWebOlive
TdxAlphaColors.ForestGreen$FF228B22clWebForestGreen
TdxAlphaColors.GreenYellow$FF2FFFADclWebGreenYellow
TdxAlphaColors.Chartreuse$FF00FF7FclWebChartreuse
TdxAlphaColors.LightGreen$FF90EE90clWebLightGreen
TdxAlphaColors.Aquamarine$FFD4FF7FclWebAquamarine
TdxAlphaColors.SeaGreen$FF578B2EclWebSeaGreen
TdxAlphaColors.Goldenrod$FF20A5DAclWebGoldenRod
TdxAlphaColors.Khaki$FF8CE6F0clWebKhaki
TdxAlphaColors.OliveDrab$FF238E6BclWebOliveDrab
TdxAlphaColors.Green$FF008000clWebGreen
TdxAlphaColors.YellowGreen$FF32CD9AclWebYellowGreen
TdxAlphaColors.LawnGreen$FF00FC7CclWebLawnGreen
TdxAlphaColors.PaleGreen$FF98FB98clWebPaleGreen
TdxAlphaColors.MediumAquamarine$FFAACD66clWebMediumAquamarine
TdxAlphaColors.MediumSeaGreen$FF71B33CclWebMediumSeaGreen
TdxAlphaColors.DarkGoldenrod$FF0B86B8clWebDarkGoldenRod
TdxAlphaColors.DarkKhaki$FF6BB7BDclWebDarkKhaki
TdxAlphaColors.DarkOliveGreen$FF2F6B55clWebDarkOliveGreen
TdxAlphaColors.DarkGreen$FF006400clWebDarkGreen
TdxAlphaColors.LimeGreen$FF32CD32clWebLimeGreen
TdxAlphaColors.Lime$FF00FF00clWebLime
TdxAlphaColors.SpringGreen$FF7FFF00clWebSpringGreen
TdxAlphaColors.MediumSpringGreen$FF9AFA00clWebMediumSpringGreen
TdxAlphaColors.DarkSeaGreen$FF8FBC8FclWebDarkSeaGreen
TdxAlphaColors.LightSeaGreen$FFAAB220clWebLightSeaGreen
TdxAlphaColors.PaleTurquoise$FFEEEEAFclWebPaleTurquoise
TdxAlphaColors.LightCyan$FFFFFFE0clWebLightCyan
TdxAlphaColors.LightBlue$FFE6D8ADclWebLightBlue
TdxAlphaColors.LightSkyBlue$FFFACE87clWebLightSkyBlue
TdxAlphaColors.CornflowerBlue$FFED9564clWebCornFlowerBlue
TdxAlphaColors.DarkBlue$FF8B0000clWebDarkBlue
TdxAlphaColors.Indigo$FF82004BclWebIndigo
TdxAlphaColors.MediumTurquoise$FFCCD148clWebMediumTurquoise
TdxAlphaColors.Turquoise$FFD0E040clWebTurquoise
TdxAlphaColors.Cyan$FFFFFF00clWebCyan
TdxAlphaColors.PowderBlue$FFE6E0B0clWebPowderBlue
TdxAlphaColors.SkyBlue$FFEBCE87clWebSkyBlue
TdxAlphaColors.RoyalBlue$FFE16941clWebRoyalBlue
TdxAlphaColors.MediumBlue$FFCD0000clWebMediumBlue
TdxAlphaColors.MidnightBlue$FF701919clWebMidnightBlue
TdxAlphaColors.DarkTurquoise$FFD1CE00clWebDarkTurquoise
TdxAlphaColors.CadetBlue$FFA09E5FclWebCadetBlue
TdxAlphaColors.DarkCyan$FF8B8B00clWebDarkCyan
TdxAlphaColors.Teal$FF808000clWebTeal
TdxAlphaColors.DeepSkyBlue$FFFFBF00clWebDeepskyBlue
TdxAlphaColors.DodgerBlue$FFFF901EclWebDodgerBlue
TdxAlphaColors.Blue$FFFF0000clWebBlue
TdxAlphaColors.Navy$FF800000clNavy
TdxAlphaColors.DarkViolet$FFD30094clWebDarkViolet
TdxAlphaColors.DarkOrchid$FFCC3299clWebDarkOrchid
TdxAlphaColors.Magenta$FFFF00FFclWebMagenta
TdxAlphaColors.DarkMagenta$FF8B008BclWebDarkMagenta
TdxAlphaColors.MediumVioletRed$FF8515C7clWebMediumVioletRed
TdxAlphaColors.PaleVioletRed$FF9370DBclWebPaleVioletRed
TdxAlphaColors.BlueViolet$FFE22B8AclWebBlueViolet
TdxAlphaColors.MediumOrchid$FFD355BAclWebMediumOrchid
TdxAlphaColors.MediumPurple$FFDB7093clWebMediumPurple
TdxAlphaColors.Purple$FF800080clWebPurple
TdxAlphaColors.DeepPink$FF9314FFclWebDeepPink
TdxAlphaColors.LightPink$FFC1B6FFclWebLightPink
TdxAlphaColors.Violet$FFEE82EEclWebViolet
TdxAlphaColors.Orchid$FFD670DAclWebOrchid
TdxAlphaColors.Plum$FFDDA0DDclWebPlum
TdxAlphaColors.Thistle$FFD8BFD8clWebThistle
TdxAlphaColors.HotPink$FFB469FFclWebHotPink
TdxAlphaColors.Pink$FFCBC0FFclWebPink
TdxAlphaColors.LightSteelBlue$FFDEC4B0clWebLightSteelBlue
TdxAlphaColors.MediumSlateBlue$FFEE687BclWebMediumSlateBlue
TdxAlphaColors.LightSlateGray$FF998877clWebLightSlateGray
TdxAlphaColors.White$FFFFFFFFclWebWhite
TdxAlphaColors.LightGray$FFD3D3D3clWebLightgrey
TdxAlphaColors.Gray$FF808080clWebGray
TdxAlphaColors.SteelBlue$FFB48246clWebSteelBlue
TdxAlphaColors.SlateBlue$FFCD5A6AclWebSlateBlue
TdxAlphaColors.SlateGray$FF908070clWebSlateGray
TdxAlphaColors.WhiteSmoke$FFF5F5F5clWebWhiteSmoke
TdxAlphaColors.Silver$FFC0C0C0clWebSilver
TdxAlphaColors.DimGray$FF696969clWebDimGray
TdxAlphaColors.MistyRose$FFE1E4FFclWebMistyRose
TdxAlphaColors.DarkSlateBlue$FF8B3D48clWebDarkSlateBlue
TdxAlphaColors.DarkSlateGray$FF4F4F2FclWebDarkSlateGray
TdxAlphaColors.Gainsboro$FFDCDCDCclWebGainsboro
TdxAlphaColors.DarkGray$FFA9A9A9clWebDarkGray
TdxAlphaColors.Black$FF000000clWebBlack

System Colors

The following table lists all class functions that return TdxAlphaColor counterparts of colors defined in the Windows Control panel:

TdxAlphaColorTColorDescription
TdxAlphaColors.ActiveBorderclActiveBorderThe active window border color.
TdxAlphaColors.ActiveCaptionclActiveCaptionThe active window title bar color.
TdxAlphaColors.AppWorkSpaceclAppWorkSpaceThe current application workspace color.
TdxAlphaColors.BackgroundclBackgroundThe Windows desktop background color.
TdxAlphaColors.BtnFaceclBtnFaceThe button face color.
TdxAlphaColors.BtnHighlightclBtnHighlightThe button highlight color.
TdxAlphaColors.BtnShadowclBtnShadowThe button shadow color.
TdxAlphaColors.BtnTextclBtnTextThe button caption color.
TdxAlphaColors.CaptionTextclCaptionTextThe active window title text color.
TdxAlphaColors.GradientActiveCaptionclGradientActiveCaptionThe end point of the gradient used to fill the title bar of the active window in Windows 2000. Used for backward compatibility only.
TdxAlphaColors.GradientInactiveCaptionclGradientInactiveCaptionThe end point of the gradient used to fill title bars of inactive windows in Windows 2000. Used for backward compatibility only.
TdxAlphaColors.GrayTextclGrayTextThe dimmed text color.
TdxAlphaColors.HighlightclHighlightThe selected text color.
TdxAlphaColors.HotLightclHotLightThe hot-track effect color.
TdxAlphaColors.InactiveBorderclInactiveBorderThe border color for inactive windows.
TdxAlphaColors.InactiveCaptionTextclInactiveCaptionTextThe title text color for inactive windows.
TdxAlphaColors.InfoBkclInfoBkThe background color for tooltip controls in Windows 95. Used for backward compatibility only.
TdxAlphaColors.InfoTextclInfoTextThe text color for tooltip controls in Window 95. Used for backward compatibility only.
TdxAlphaColors.MenuclMenuThe menu background color.
TdxAlphaColors.MenuBarclMenuBarThe menu bar color.
TdxAlphaColors.MenuHighlightclMenuHighlightThe menu item highlight color.
TdxAlphaColors.MenuTextclMenuTextThe menu text color.
TdxAlphaColors.ScrollBarclScrollBarThe scroll bar track color.
TdxAlphaColors._3DDkShadowcl3DDkShadowThe dark shadow color for UI elements with 3D effects in Windows 95. Used for backward compatibility only.
TdxAlphaColors._3DLightcl3DLightThe light color for UI elements with 3D effects in Windows 95. Used for backward compatibility only.
TdxAlphaColors.WindowclWindowThe window background color.
TdxAlphaColors.WindowFrameclWindowFrameThe window frame color.
TdxAlphaColors.WindowTextclWindowTextThe window text color.

Special Colors

DefaultStores the default TdxAlphaColor value that corresponds to a skin-determined color.EmptyAn empty TdxAlphaColor constant whose alpha and color values are set to zero.TransparentStores the transparent TdxAlphaColor value (corresponds to the white color with zero alpha).

Auxiliary Functions

Alpha | B | G | RReturn corresponding color channel values (from 0 to 255) for a specified TdxAlphaColor.BlendBlends two TdxAlphaColor values (foreground and background colors) to create an opaque color.CalculateNearestColorUses the HSL (HSB) color model to compare a specified color to all colors in a palette and returns the most similar color.ChangeBrightnessCreates a new TdxAlphaColor value based on a specified color and the required brightness value (from 0.0 to 1.0).GetBrightness | GetHue | GetSaturationReturn brightness (lightness), hue, and saturation values (from 0.0 to 1.0) for a specified TdxAlphaColor.IsEmpty | IsTransparentOrEmptyIdentify if a specified color matches the Empty or Transparent special color.

Color Conversion Functions

FromArgbCreates a TdxAlphaColor from specified individual component values.FromColorConverts a TColor value to TdxAlphaColor (opaque).FromHSLCreates a TdxAlphaColor from hue, saturation, and brightness (lightness) values (from 0.0 to 1.0).FromHTMLConverts a hexadecimal HTML color value to TdxAlphaColor (opaque).ToColorConverts a TdxAlphaColor value to TColor.ToHSLReturns hue, saturation, and brightness (lightness) values for a specified [TdxAlphaColor] value.ToHTMLConverts a TdxAlphaColor value to the HTML hexadecimal format.

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.dxAlphaColorToRGBQuadConverts a specified TdxAlphaColor value to the TRGBQuad type.dxColorToAlphaColorConverts a specified TColor value to the TdxAlphaColor type.dxColorToRGBQuadConverts 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.dxRGBQuadToColorConverts a specified TRGBQuad value to the TColor type.

Utility Methods

dxGetAlphaExtracts the alpha value (also called transparency level) from a specified color.dxGetBlueExtracts the blue color component value from a specified color.dxGetGreenExtracts the green color component value from a specified color.dxGetRedExtracts the red color component value from a specified color. See Also

TdxAlphaColors Members

dxCoreGraphics Unit