Table of Contents

TScRGBColor Record

Implements a simple representation of a color in scRGB colorspace. Components are doubles going from 0 to 1.

Syntax

Unit: FlexCel.Core

TScRGBColor = record;

Methods

Name Description
CompareTo Returns -1 if obj is more than color, 0 if both colors are the same, and 1 if obj is less than color.
Create Overloaded
Create(TUIColor)
Create(TColor)
Create(Double, Double, Double)
Equals Returns true if both colors are the same.
GetHashCode Returns a hashcode for the color.
RGBtoSRGB Converts a RGB value to sRGB using a gamma of 2.2
SRGBtoRGB Converts a sRGB value to RGB using a gamma of 2.2

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 Overloaded
Implicit conversion from TUIColor to TScRGBColor
Implicit conversion from TScRGBColor to TUIColor
Implicit conversion from TColor to TScRGBColor
Implicit conversion from TScRGBColor to TColor
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
B Blue component in the RGB space. (0-255)
Empty Returns an empty color.
G Green component in the RGB space. (0-255)
R Red component in the RGB space. (0-255)
ScB ScBlue component. (between 0 and 1)
ScG ScGreen component. (between 0 and 1)
ScR ScRed component. (between 0 and 1)