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