Color Class
An ARGB (alpha, red, green, blue) color.
Declaration
export class Color
constructor(colorValue)
Initializes a new instance of the Color
class with specified settings.
Declaration
constructor(
colorValue: number
)
Parameters
Name |
Type |
colorValue |
number |
Properties
A Property
Gets the alpha component value of this Color structure.
Declaration
get A(): any
Property Value
Type |
Description |
any |
The alpha component value of this Color.
|
B Property
Gets the blue component value of this Color structure.
Declaration
get B(): any
Property Value
Type |
Description |
any |
The blue component value of this Color.
|
css Property
Declaration
get css(): string
Property Value
G Property
Gets the green component value of this Color structure.
Declaration
get G(): any
Property Value
Type |
Description |
any |
The green component value of this Color.
|
R Property
Gets the red component value of this Color structure.
Declaration
get R(): any
Property Value
Type |
Description |
any |
The red component value of this Color.
|
Methods
blend(blendColor, opacity) Method
Declaration
blend(
blendColor: any,
opacity: any
): Color
Parameters
Name |
Type |
blendColor |
any |
opacity |
any |
Returns
contrastColor(baseColor) Method
Declaration
static contrastColor(
baseColor: Color
): Color
Parameters
Name |
Type |
baseColor |
Color |
Returns
equals(color1, color2) Method
Declaration
static equals(
color1: Color,
color2: Color
): boolean
Parameters
Name |
Type |
color1 |
Color |
color2 |
Color |
Returns
fromAppearance(appearanceType) Method
Declaration
static fromAppearance(
appearanceType: string
): Color
Parameters
Name |
Type |
appearanceType |
string |
Returns
fromArgb(alpha, red, green, blue) Method
Declaration
static fromArgb(
alpha: number,
red: number,
green: number,
blue: number
): Color
Parameters
Name |
Type |
alpha |
number |
red |
number |
green |
number |
blue |
number |
Returns
fromDxColor(dxColor) Method
Declaration
static fromDxColor(
dxColor: any
): Color
Parameters
Returns
fromJSON(jsonValue) Method
Declaration
static fromJSON(
jsonValue: string
): Color
Parameters
Name |
Type |
jsonValue |
string |
Returns
fromRgbaString(rgbaColor) Method
Declaration
static fromRgbaString(
rgbaColor: string
): Color
Parameters
Name |
Type |
rgbaColor |
string |
Returns
toHex Method
Declaration
toHex(): any
Returns
toHex(colorValue) Method
Declaration
static toHex(
colorValue: number
): string
Parameters
Name |
Type |
colorValue |
number |
Returns
toJSON(color) Method
Declaration
static toJSON(
color: Color
): number
Parameters
Returns
toNumber Method
Declaration
toNumber(): number
Returns
toNumber(alpha, red, green, blue) Method
Declaration
static toNumber(
alpha: number,
red: number,
green: number,
blue: number
): number
Parameters
Name |
Type |
alpha |
number |
red |
number |
green |
number |
blue |
number |
Returns