mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
constructor with knowColor added
This commit is contained in:
55
color/color.d.ts
vendored
55
color/color.d.ts
vendored
@ -6,53 +6,54 @@ declare module "color" {
|
|||||||
* Represents a color object. Stores all color components (alpha (opacity), red, green, blue) in a [0..255] range.
|
* Represents a color object. Stores all color components (alpha (opacity), red, green, blue) in a [0..255] range.
|
||||||
*/
|
*/
|
||||||
class Color {
|
class Color {
|
||||||
|
constructor(knownColor: string);
|
||||||
constructor(hex: string);
|
constructor(hex: string);
|
||||||
constructor(argb: number);
|
constructor(argb: number);
|
||||||
constructor(alpha: number, red: number, green: number, blue: number);
|
constructor(alpha: number, red: number, green: number, blue: number);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Alpha component (in the [0, 255] range) of this color. This is a read-only property.
|
* Gets the Alpha component (in the [0, 255] range) of this color. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
public a: number;
|
public a: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Red component (in the [0, 255] range) of this color. This is a read-only property.
|
* Gets the Red component (in the [0, 255] range) of this color. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
public r: number;
|
public r: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Green component (in the [0, 255] range) of this color. This is a read-only property.
|
* Gets the Green component (in the [0, 255] range) of this color. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
public g: number;
|
public g: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Blue component (in the [0, 255] range) of this color. This is a read-only property.
|
* Gets the Blue component (in the [0, 255] range) of this color. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
public b: number;
|
public b: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Hexadecimal string representation of this color. This is a read-only property.
|
* Gets the Hexadecimal string representation of this color. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
public hex: string;
|
public hex: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Argb Number representation of this color where each 8 bits represent a single color component. This is a read-only property.
|
* Gets the Argb Number representation of this color where each 8 bits represent a single color component. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
public argb: number;
|
public argb: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
* 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.
|
||||||
*/
|
*/
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the android-specific integer value representation. Same as the Argb one. This is a read-only property.
|
* Gets the android-specific integer value representation. Same as the Argb one. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
android: number;
|
android: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the iOS-specific UIColor value representation. This is a read-only property.
|
* Gets the iOS-specific UIColor value representation. This is a read-only property.
|
||||||
*/
|
*/
|
||||||
ios: UIColor;
|
ios: UIColor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user