[mxcad_3d API Document](../README. md)/Mx3dGeColor
Class: Mx3dGeColor 
The class that represents color objects.
Hierarchy 
- ↳ - Mx3dGeColor
Table of contents 
Constructors 
Methods 
- Blue
- ChangeContrast
- ChangeIntensity
- DeltaE2000
- Distance
- Green
- Hue
- IsDifferent
- IsEqual
- Light
- Name
- Red
- Saturation
- SetValues
- SquareDistance
Constructors 
constructor 
• new Mx3dGeColor()
Create a color object.
Overrides 
Mx3dBaseObject.constructor
• new Mx3dGeColor(theColorName)
Create a color object using a color name.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheColorName | [MxNameOfColor] (../enums/MdGe. MxNameOfColor. md) | Color name | 
Overrides 
Mx3dBaseObject.constructor
• new Mx3dGeColor(theR, theG, theB, theType)
Create a color object using RGB values and color types.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheR | number | red component | 
| TheG | Number | Green component | 
| TheB | Number | Blue component | 
| TheType | [MxTypeOfColor] (../enums/MdGe. MxTypeOfColor. md) | Color type | 
Overrides 
Mx3dBaseObject.constructor
Methods 
Blue 
▸ Blue(): number
Obtain the value of the blue component.
Returns 
number
Blue component.
ChangeContrast 
▸ ChangeContrast(theDelta): void
Change the contrast of colors.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The Delta | number | contrast variation | 
Returns 
void
ChangeIntensity 
▸ ChangeIntensity(theDelta): void
Change the intensity of the color.
Parameters 
| Name | Type | Description | 
|---|---|---|
| The Delta | number | intensity change | 
Returns 
void
DeltaE2000 
▸ DeltaE2000(theOther): number
Calculate the Delta E2000 difference between colors.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheOther | [Mx3dGeColor] (Mx3dGeColor. md) | Another color object | 
Returns 
number
Delta E2000 differential value.
Distance 
▸ Distance(theColor): number
Calculate the distance between colors.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheColor | [Mx3dGeColor] (Mx3dGeColor. md) | Another color object | 
Returns 
number
Color distance.
Green 
▸ Green(): number
Obtain the value of the green component.
Returns 
number
Green component.
Hue 
▸ Hue(): number
Obtain color tone values.
Returns 
number
Color tone value.
IsDifferent 
▸ IsDifferent(theOther): boolean
Determine if the colors are different.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheOther | [Mx3dGeColor] (Mx3dGeColor. md) | Another color object | 
Returns 
boolean
Is it different.
IsEqual 
▸ IsEqual(theOther): boolean
Determine if the colors are the same.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheOther | [Mx3dGeColor] (Mx3dGeColor. md) | Another color object | 
Returns 
boolean
Are they the same.
Light 
▸ Light(): number
Obtain brightness value.
Returns 
number
Brightness value.
Name 
▸ Name(): MxNameOfColor
Get the name of the color.
Returns 
Color name.
Red 
▸ Red(): number
Obtain the value of the red component.
Returns 
number
The red component.
Saturation 
▸ Saturation(): number
Obtain saturation value.
Returns 
number
Saturation value.
SetValues 
▸ SetValues(theName): void
Set the value of the color.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheName | [MxNameOfColor] (../enums/MdGe. MxNameOfColor. md) | Color name | 
Returns 
void
▸ SetValues(theC1, theC2, theC3, theType): void
Set the value of the color.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheC1 | Number | Red component | 
| TheC2 | Number | Green component | 
| TheC3 | Number | Blue component | 
| TheType | [MxTypeOfColor] (../enums/MdGe. MxTypeOfColor. md) | Color type | 
Returns 
void
SquareDistance 
▸ SquareDistance(theColor): number
Calculate the square distance between colors.
Parameters 
| Name | Type | Description | 
|---|---|---|
| TheColor | [Mx3dGeColor] (Mx3dGeColor. md) | Another color object | 
Returns 
number
Color squared distance.