Table of Contents

TDrawingColor Record

Represents a Color for a drawing or a theme. Different from TExcelColor, this structure is defined in terms of DrawingML, not SpreadsheetML.

Syntax

Unit: FlexCel.Core

TDrawingColor = record;

Methods

Name Description
AddTransform Returns the DrawingColor that results of applying the transform to the existing DrawingColor.
CompareTo Returns -1 if obj is more than color, 0 if both colors are the same, and 1 if obj is less than color.
Equals Returns true if both instances have the same color.
FromColor Returns a color class with a specified color. There is no real need to call this method, since conversion between TDrawingColor and TUIColor is implicit. You can just assign Color to this class and viceversa.
FromHSL Overloaded
FromHSL(THSLColor)
FromHSL(THSLColor, TColorTransformArray)
FromPreset Overloaded
FromPreset(TPresetColor)
FromPreset(TPresetColor, TColorTransformArray)
FromRgb Overloaded
FromRgb(Byte, Byte, Byte)
FromRgb(Byte, Byte, Byte, TColorTransformArray)
FromScRgb Overloaded
FromScRgb(TScRGBColor)
FromScRgb(TScRGBColor, TColorTransformArray)
FromSystem Overloaded
FromSystem(TSystemColor)
FromSystem(TSystemColor, TColorTransformArray)
FromTheme Overloaded
FromTheme(TThemeColor)
FromTheme(TThemeColor, TColorTransformArray)
GetColorTransform Returns an array with all the color transforms in this object.
GetComponents Returns R, G and B components of the color. If this is a theme or indexed color, it will be converted to RGB before getting the components.
GetHashCode Returns the hashcode of the object.
GetSystemColor Returns the color associated with a simple color.
IndexedSolidPalette Returns the indexed colors from 0 to 7. Mostly for internal use.
ToColor Returns the UI Color specified by this structure.

Operators

Name Description
Equality Adapts the = operator so it returns true when both instances have the same values.
GreaterThan Adapts the > operator so it returns true when the first parameter is bigger than the second.
Implicit Conversion Automatically converts from TUIColor instances to TDrawingColor instances
Inequality Adapts the <> operator so it returns true when both instances have different values.
LessThan Adapts the < operator so it returns true when the first parameter is smaller than the second.

Properties

Name Description
ColorType Identifies which kind of color is the one to apply in this structure.
HSL Returns the color when this structure has an HSL color, as a 0xHHSSLL integer.


If you try to read the value of this property and ColorType is not the right kind, an Exception will be raised.
Preset Returns the color when this structure has a Preset color.


If you try to read the value of this property and ColorType is not the right kind, an Exception will be raised.
RGB Returns the color when this structure has an RGB color, as a 0xRRGGBB integer.


If you try to read the value of this property and ColorType is not the right kind, an Exception will be raised.
ScRGB Returns the color when this structure has an scRGB color.


If you try to read the value of this property and ColorType is not the right kind, an Exception will be raised.
System Returns the color when this structure has a System color.


If you try to read the value of this property and ColorType is not the right kind, an Exception will be raised.
Theme Returns the color when this structure has a Themed color.


If you try to read the value of this property and ColorType is not the right kind, an Exception will be raised.
Transparent Returns the transparent color.