Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / src / draw / Color.js
index 61dad90..2264446 100644 (file)
@@ -1,7 +1,18 @@
+/*
+
+This file is part of Ext JS 4
+
+Copyright (c) 2011 Sencha Inc
+
+Contact:  http://www.sencha.com/contact
+
+GNU General Public License Usage
+This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
+
+If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
+
+*/
 /**
- * @class Ext.draw.Color
- * @extends Object
- *
  * Represents an RGB color and provides helper functions get
  * color components in HSL color space.
  */
@@ -23,7 +34,7 @@ Ext.define('Ext.draw.Color', {
     lightnessFactor: 0.2,
 
     /**
-     * @constructor
+     * Creates new Color.
      * @param {Number} red Red component (0..255)
      * @param {Number} green Green component (0..255)
      * @param {Number} blue Blue component (0..255)
@@ -62,7 +73,7 @@ Ext.define('Ext.draw.Color', {
 
     /**
      * Get the RGB values.
-     * @return {Array}
+     * @return {[Number]}
      */
     getRGB: function() {
         var me = this;
@@ -71,7 +82,7 @@ Ext.define('Ext.draw.Color', {
 
     /**
      * Get the equivalent HSL components of the color.
-     * @return {Array}
+     * @return {[Number]}
      */
     getHSL: function() {
         var me = this,
@@ -146,9 +157,12 @@ Ext.define('Ext.draw.Color', {
     /**
      * Convert a color to hexadecimal format.
      *
-     * @param {String|Array} color The color value (i.e 'rgb(255, 255, 255)', 'color: #ffffff').
+     * **Note:** This method is both static and instance.
+     *
+     * @param {String/[String]} color The color value (i.e 'rgb(255, 255, 255)', 'color: #ffffff').
      * Can also be an Array, in this case the function handles the first member.
      * @returns {String} The color in hexadecimal format.
+     * @static
      */
     toHex: function(color) {
         if (Ext.isArray(color)) {
@@ -181,8 +195,11 @@ Ext.define('Ext.draw.Color', {
      *
      * If the string is not recognized, an undefined will be returned instead.
      *
+     * **Note:** This method is both static and instance.
+     *
      * @param {String} str Color in string.
      * @returns Ext.draw.Color
+     * @static
      */
     fromString: function(str) {
         var values, r, g, b,
@@ -228,10 +245,13 @@ Ext.define('Ext.draw.Color', {
     /**
      * Create a new color based on the specified HSL values.
      *
+     * **Note:** This method is both static and instance.
+     *
      * @param {Number} h Hue component (0..359)
      * @param {Number} s Saturation component (0..1)
      * @param {Number} l Lightness component (0..1)
      * @returns Ext.draw.Color
+     * @static
      */
     fromHSL: function(h, s, l) {
         var C, X, m, i, rgb = [],
@@ -291,3 +311,4 @@ Ext.define('Ext.draw.Color', {
         }
     });
 });
+