Classes
Color
Color
Represents a color object. Stores all color components (alpha (opacity), red, green, blue) in a [0..255] range.
Summary 
Constructors
Constructors 
constructor 
Properties 
a 
 defined in @nativescript/core/color/index.d.ts:13:8
Gets the Alpha component (in the [0, 255] range) of this color. This is a read-only property.
android 
 defined in @nativescript/core/color/index.d.ts:48:1
Gets the android-specific integer value representation. Same as the Argb one. This is a read-only property.
argb 
 defined in @nativescript/core/color/index.d.ts:38:8
Gets the Argb Number representation of this color where each 8 bits represent a single color component. This is a read-only property.
b 
 defined in @nativescript/core/color/index.d.ts:28:8
Gets the Blue component (in the [0, 255] range) of this color. This is a read-only property.
g 
 defined in @nativescript/core/color/index.d.ts:23:8
Gets the Green component (in the [0, 255] range) of this color. This is a read-only property.
hex 
 defined in @nativescript/core/color/index.d.ts:33:8
Gets the Hexadecimal string representation of this color. This is a read-only property.
ios 
 defined in @nativescript/core/color/index.d.ts:53:1
Gets the iOS-specific UIColor value representation. This is a read-only property.
name 
 defined in @nativescript/core/color/index.d.ts:43:8
Gets the known name of this instance. Defined only if it has been constructed from a known color name - e.g. "red". This is a read-only property.
r 
 defined in @nativescript/core/color/index.d.ts:18:8
Gets the Red component (in the [0, 255] range) of this color. This is a read-only property.
Methods 
brighten 
brighten(amount: number): Color
 defined in @nativescript/core/color/index.d.ts:172:1
Brighten the color a given amount, from 0 to 100.
 Returns Color
darken 
darken(amount: number): Color
 defined in @nativescript/core/color/index.d.ts:179:1
Darken the color a given amount, from 0 to 100. Providing 100 will always return black.
 Returns Color
desaturate 
desaturate(amount: number): Color
 defined in @nativescript/core/color/index.d.ts:143:1
Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling greyscale.
 Returns Color
equals 
equals(value: Color): boolean
 defined in @nativescript/core/color/index.d.ts:59:1
Specifies whether this Color is equal to the Color parameter.
 Returns boolean
getBrightness 
 defined in @nativescript/core/color/index.d.ts:95:1
return the [brightness](http://www.w3.org/TR/AERT#color-contrast)
 Returns number
getLuminance 
 defined in @nativescript/core/color/index.d.ts:100:1
return the [luminance](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef)
 Returns number
greyscale 
greyscale(): Color
 defined in @nativescript/core/color/index.d.ts:157:1
Completely desaturates a color into greyscale. Same as calling desaturate(100).
 Returns Color
isDark 
isLight 
lighten 
lighten(amount: number): Color
 defined in @nativescript/core/color/index.d.ts:165:1
Lighten the color a given amount, from 0 to 100. Providing 100 will always return white.
 Returns Color
saturate 
saturate(amount: number): Color
 defined in @nativescript/core/color/index.d.ts:150:1
Saturate the color a given amount, from 0 to 100.
 Returns Color
setAlpha 
setAlpha(a: number): Color
 defined in @nativescript/core/color/index.d.ts:107:1
Return this color (as a new Color instance) with the provided alpha
 Returns Color
spin 
spin(amount: number): Color
 defined in @nativescript/core/color/index.d.ts:186:1
Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).
 Returns Color
toHsl 
 defined in @nativescript/core/color/index.d.ts:112:1
return the hsl representation of the color
 Returns {
  a: number
  h: number
  l: number
}
toHslString 
 defined in @nativescript/core/color/index.d.ts:118:1
return the [CSS hsv](https://www.w3schools.com/Css/css_colors_hsl.asp) representation of the color
 Returns string
toHsv 
 defined in @nativescript/core/color/index.d.ts:124:1
return the hsv representation of the color
 Returns {
  a: number
  h: number
  s: number
}
toHsvString 
 defined in @nativescript/core/color/index.d.ts:130:1
return the [CSS hsv](https://www.w3schools.com/Css/css_colors_rgb.asp) representation of the color
 Returns string
toRgbString 
 defined in @nativescript/core/color/index.d.ts:136:1
return the [CSS rgb](https://www.w3schools.com/Css/css_colors_rgb.asp) representation of the color
 Returns string
equals 
Static
fromIosColor 
Static
fromIosColor(value: any): Color
 defined in @nativescript/core/color/index.d.ts:77:1
Creates color from iOS-specific UIColor value representation.
 Returns Color
isValid 
Static
 defined in @nativescript/core/color/index.d.ts:72:1
Validates if a value can be converted to color.
 Returns boolean
- Previous
 - CoercibleProperty
 - Next
 - ContainerView