From 6cb4dc15d9eba371d2fd4561d0a9dad5fc7a1f74 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Thu, 5 Mar 2015 13:49:16 +0200 Subject: [PATCH] constructor with knowColor added --- color/color.d.ts | 55 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/color/color.d.ts b/color/color.d.ts index 742f806ce..6e31ddd03 100644 --- a/color/color.d.ts +++ b/color/color.d.ts @@ -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. */ class Color { + constructor(knownColor: string); constructor(hex: string); constructor(argb: 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; - /** - * 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; /**