constructor with knowColor added

This commit is contained in:
Vladimir Enchev
2015-03-05 13:49:16 +02:00
parent 9ff509a626
commit 6cb4dc15d9

55
color/color.d.ts vendored
View File

@ -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;
/** /**