From a47d9e1c2f5898991784fc3a49f4adbdebf3e5bb Mon Sep 17 00:00:00 2001 From: tjcrowder Date: Thu, 10 Sep 2009 16:32:36 +0100 Subject: [PATCH] doc: Merged and updated old docs for Number#toColorPart. --- src/lang/number.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lang/number.js b/src/lang/number.js index bd171a7..ea7da0d 100644 --- a/src/lang/number.js +++ b/src/lang/number.js @@ -17,8 +17,13 @@ Object.extend(Number.prototype, (function() { * Number#toColorPart() -> String * * Produces a 2-digit hexadecimal representation of the number - * (which is therefore assumed to be in the [0..255] range). + * (which is therefore assumed to be in the \[0..255\] range, inclusive). * Useful for composing CSS color strings. + * + * ### Example + * + * 10.toColorPart() + * // -> "0a" **/ function toColorPart() { return this.toPaddedString(2, 16);