Table of Contents

TLabColor Structure

Implements a simple representation of a color in CIE-L*a*b* colorspace. This colorspace is mostly used for finding distances between colors.

Syntax

Namespace: FlexCel.Core

public struct TLabColor

Constructors

Name Description
TLabColor Overloaded
TLabColor(TUIColor)
TLabColor(Color)

Methods

Name Description
ToColor Returns a system color from this instance. This method is only needed in Visual Basic, in C# you can just assign the LabColor to the Color:...[more]
DistanceSquared Returns the euclidean distance squared (DeltaE CIE 1976 squared) between this color and other color.
CMCSquared Returns the CMC color distance between this color and color2 (distance returned is squared, so you need to get the sqrt if you want the real CMC value). Note that CMC is not symmetric (​Color1.​CMC(​Color2) != Color2.​CMC(​Color1)​, so this color is the one used as reference.
Equals Returns true if both colors are the same.
GetHashCode Returns a hashcode for the color.
CompareTo Returns -1 if obj is more than color, 0 if both colors are the same, and 1 if obj is less than color.

Operators

Name Description
Implicit Conversion Overloaded
Implicit conversion from TUIColor to TLabColor
Implicit conversion from TLabColor to TUIColor
Implicit conversion from Color to TLabColor
Implicit conversion from TLabColor to Color
Equality Returns true if both colors are equal.
Inequality Returns true if both colors do not have the same value.
GreaterThan Returns true if o1 is bigger than o2.
LessThan Returns true if o1 is less than o2.

Properties

Name Description
L0 L* (Lightness) (Between 0 and 100)
a0 a* component.
b0 b* component.
R Red component in the RGB space.
G Green component in the RGB space.
B Blue component in the RGB space.