docs: function parse(str) {
      if (typeof str == 'string') {
  
          if (ColorNames.isColorName(str)) {
              str = ColorNames.getColorByName(str);
          }
  
          if (str.indexOf("rgb(") > -1) {
              var arr = str.replace("rgb(", "").replace(")", "").split(",");
  
              for (var i = 0, len = arr.length; i < len; i++) {
                  arr[i] = parseInt(trim(arr[i]), 10);
              }
  
              var obj = { type: 'rgb', r: arr[0], g: arr[1], b: arr[2], a: 1 };
  
              obj = Object.assign(obj, RGBtoHSL(obj));
  
              return obj;
          } else if (str.indexOf("rgba(") > -1) {
              var arr = str.replace("rgba(", "").replace(")", "").split(",");
  
              for (var i = 0, len = arr.length; i < len; i++) {
  
                  if (len - 1 == i) {
                      arr[i] = parseFloat(trim(arr[i]));
                  } else {
                      arr[i] = parseInt(trim(arr[i]), 10);
                  }
              }
  
              var obj = { type: 'rgb', r: arr[0], g: arr[1], b: arr[2], a: arr[3] };
  
              obj = Object.assign(obj, RGBtoHSL(obj));
  
              return obj;
          } else if (str.indexOf("hsl(") > -1) {
              var arr = str.replace("hsl(", "").replace(")", "").split(",");
  
              for (var i = 0, len = arr.length; i < len; i++) {
                  arr[i] = parseFloat(trim(arr[i]));
              }
  
              var obj = { type: 'hsl', h: arr[0], s: arr[1], l: arr[2], a: 1 };
  
              obj = Object.assign(obj, HSLtoRGB(obj));
  
              return obj;
          } else if (str.indexOf("hsla(") > -1) {
              var arr = str.replace("hsla(", "").replace(")", "").split(",");
  
              for (var i = 0, len = arr.length; i < len; i++) {
  
                  if (len - 1 == i) {
                      arr[i] = parseFloat(trim(arr[i]));
                  } else {
                      arr[i] = parseInt(trim(arr[i]), 10);
                  }
              }
  
              var obj = { type: 'hsl', h: arr[0], s: arr[1], l: arr[2], a: arr[3] };
  
              obj = Object.assign(obj, HSLtoRGB(obj));
  
              return obj;
          } else if (str.indexOf("#") == 0) {
  
              str = str.replace("#", "");
  
              var arr = [];
              if (str.length == 3) {
                  for (var i = 0, len = str.length; i < len; i++) {
                      var char = str.substr(i, 1);
                      arr.push(parseInt(char + char, 16));
                  }
              } else {
                  for (var i = 0, len = str.length; i < len; i += 2) {
                      arr.push(parseInt(str.substr(i, 2), 16));
                  }
              }
  
              var obj = { type: 'hex', r: arr[0], g: arr[1], b: arr[2], a: 1 };
  
              obj = Object.assign(obj, RGBtoHSL(obj));
  
              return obj;
          }
      } else if (typeof str == 'number') {
          if (0x000000 <= str && str <= 0xffffff) {
              var r = (str & 0xff0000) >> 16;
              var g = (str & 0x00ff00) >> 8;
              var b = (str & 0x0000ff) >> 0;
  
              var obj = { type: 'hex', r: r, g: g, b: b, a: 1 };
              obj = Object.assign(obj, RGBtoHSL(obj));
              return obj;
          } else if (0x00000000 <= str && str <= 0xffffffff) {
              var _r = (str & 0xff000000) >> 24;
              var _g = (str & 0x00ff0000) >> 16;
              var _b = (str & 0x0000ff00) >> 8;
              var a = (str & 0x000000ff) / 255;
  
              var obj = { type: 'hex', r: _r, g: _g, b: _b, a: a };
              obj = Object.assign(obj, RGBtoHSL(obj));
  
              return obj;
          }
      }
  
      return str;
  }