Class
Color
Color
Summary
Constructors
Constructors
constructor
new Color(knownColor: string): Color
defined in @nativescript/core/color/index.d.ts:5:1
| Parameter | Default | Description |
knownColor | | string |
Returns Color
new Color(hex: string): Color
defined in @nativescript/core/color/index.d.ts:6:1
| Parameter | Default | Description |
hex | | string |
Returns Color
new Color(argb: number): Color
defined in @nativescript/core/color/index.d.ts:7:1
| Parameter | Default | Description |
argb | | number |
Returns Color
new Color(alpha: number, red: number, green: number, blue: number, type?: "rgb" | "hsl" | "hsv"): Color
defined in @nativescript/core/color/index.d.ts:8:1
| Parameter | Default | Description |
alpha | | number |
red | | number |
green | | number |
blue | | number |
type | | "rgb" | "hsl" | "hsv" |
Returns Color
Properties
a
defined in @nativescript/core/color/index.d.ts:13:8
android
defined in @nativescript/core/color/index.d.ts:48:1
argb
defined in @nativescript/core/color/index.d.ts:38:8
b
defined in @nativescript/core/color/index.d.ts:28:8
g
defined in @nativescript/core/color/index.d.ts:23:8
hex
defined in @nativescript/core/color/index.d.ts:33:8
ios
defined in @nativescript/core/color/index.d.ts:53:1
name
defined in @nativescript/core/color/index.d.ts:43:8
r
defined in @nativescript/core/color/index.d.ts:18:8
Methods
brighten
brighten(amount: number): Color
defined in @nativescript/core/color/index.d.ts:172:1
| Parameter | Default | Description |
amount | | number |
Returns Color
complement
complement(): Color
darken
darken(amount: number): Color
defined in @nativescript/core/color/index.d.ts:179:1
| Parameter | Default | Description |
amount | | number |
Returns Color
desaturate
desaturate(amount: number): Color
defined in @nativescript/core/color/index.d.ts:143:1
| Parameter | Default | Description |
amount | | number |
Returns Color
equals
equals(value: Color): boolean
defined in @nativescript/core/color/index.d.ts:59:1
| Parameter | Default | Description |
value | |
Returns boolean
getBrightness
getLuminance
greyscale
greyscale(): Color
isDark
isLight
lighten
lighten(amount: number): Color
defined in @nativescript/core/color/index.d.ts:165:1
| Parameter | Default | Description |
amount | | number |
Returns Color
saturate
saturate(amount: number): Color
defined in @nativescript/core/color/index.d.ts:150:1
| Parameter | Default | Description |
amount | | number |
Returns Color
setAlpha
setAlpha(a: number): Color
defined in @nativescript/core/color/index.d.ts:107:1
| Parameter | Default | Description |
a | | number |
Returns Color
spin
spin(amount: number): Color
defined in @nativescript/core/color/index.d.ts:186:1
| Parameter | Default | Description |
amount | | number |
Returns Color
toHsl
toHslString
toHsv
toHsvString
toRgbString
equals
Static
fromHSL
Static
fromHSL(a: any, h: any, s: any, l: any): Color
defined in @nativescript/core/color/index.d.ts:204:1
| Parameter | Default | Description |
a | | any |
h | | any |
s | | any |
l | | any |
Returns Color
fromHSV
Static
fromHSV(a: any, h: any, s: any, l: any): Color
defined in @nativescript/core/color/index.d.ts:205:1
| Parameter | Default | Description |
a | | any |
h | | any |
s | | any |
l | | any |
Returns Color
fromIosColor
Static
fromIosColor(value: any): Color
defined in @nativescript/core/color/index.d.ts:77:1
| Parameter | Default | Description |
value | | any |
Returns Color
isValid
Static
defined in @nativescript/core/color/index.d.ts:72:1
| Parameter | Default | Description |
value | | any |
Returns boolean
- Previous
- CoercibleProperty
- Next
- ContainerView