From 8b5f59b2f636078eebb3919930b82d8a7360e587 Mon Sep 17 00:00:00 2001 From: gartdan Date: Thu, 15 May 2014 16:47:49 -0500 Subject: [PATCH] Update jquery.color.d.ts red, green, blue, alpha, hue, saturation, lightness all accept a string parameter in the format of "+=100" or "-=100" as per https://github.com/jquery/jquery-color/ red() // returns the "red" component of the color ( Integer from 0 - 255 ) red( val ) // returns a copy of the color object with the red set to val green() // returns the "green" component of the color from ( Integer from 0 - 255 ) green( val ) // returns a copy of the color object with the green set to val blue() // returns the "blue" component of the color from ( Integer from 0 - 255 ) blue( val ) // returns a copy of the color object with the blue set to val alpha() // returns the "alpha" component of the color from ( Float from 0.0 - 1.0 ) alpha( val ) // returns a copy of the color object with the alpha set to val hue() // returns the "hue" component of the color ( Integer from 0 - 359 ) hue( val ) // returns a copy of the color object with the hue set to val saturation() // returns the "saturation" component of the color ( Float from 0.0 - 1.0 ) saturation( val ) // returns a copy of the color object with the saturation set to val lightness() // returns the "lightness" component of the color ( Float from 0.0 - 1.0 ) lightness( val ) // returns a copy of the color object with the lightness set to val // all of the above values can also take strings in the format of "+=100" or "-=100" --- jquery.color/jquery.color.d.ts | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/jquery.color/jquery.color.d.ts b/jquery.color/jquery.color.d.ts index 8d5000a6c2..4b41bae514 100644 --- a/jquery.color/jquery.color.d.ts +++ b/jquery.color/jquery.color.d.ts @@ -16,6 +16,11 @@ interface JQueryColor { */ red(val: number): JQueryColor; + /** + * Returns a copy of the color object with the red set to val. + */ + red(val: string): JQueryColor; + /** * Returns the green component of the color (integer from 0 - 255). */ @@ -26,6 +31,11 @@ interface JQueryColor { */ green(val: number): JQueryColor; + /** + * Returns a copy of the color object with the green set to val. + */ + green(val: string): JQueryColor; + /** * Returns the blue component of the color (integer from 0 - 255). */ @@ -35,6 +45,11 @@ interface JQueryColor { * Returns a copy of the color object with the blue set to val. */ blue(val: number): JQueryColor; + + /** + * Returns a copy of the color object with the blue set to val. + */ + blue(val: string): JQueryColor; /** * Returns the alpha value of this color (float from 0.0 - 1.0). @@ -46,6 +61,11 @@ interface JQueryColor { */ alpha(val: number): JQueryColor; + /** + * Returns a copy of the color object with the alpha set to val. + */ + alpha(val: string): JQueryColor; + /** * Returns the hue component of the color (integer from 0 - 359). */ @@ -56,6 +76,11 @@ interface JQueryColor { */ hue(val: number): JQueryColor; + /** + * Returns a copy of the color object with the hue set to val. + */ + hue(val: string): JQueryColor; + /** * Returns the saturation component of the color (float from 0.0 - 1.0). */ @@ -66,6 +91,11 @@ interface JQueryColor { */ saturation(val: number): JQueryColor; + /** + * Returns a copy of the color object with the saturation set to val. + */ + saturation(val: string): JQueryColor; + /** * Returns the lightness component of the color (float from 0.0 - 1.0). */ @@ -76,6 +106,11 @@ interface JQueryColor { */ lightness(val: number): JQueryColor; + /** + * Returns a copy of the color object with the lightness set to val. + */ + lightness(val: string): JQueryColor; + /** * Returns a rgba "tuple" [ red, green, blue, alpha ]. */