docs: function (colour) {
    if (!colour || !!((colour = String(colour)).indexOf("-") + 1)) {
      return {r: -1, g: -1, b: -1, opacity: -1, error: 1};
    }
    if (colour == "none") {
      return {r: -1, g: -1, b: -1, opacity: -1};
    }
    !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour));
    if (!colour) {
      return {r: -1, g: -1, b: -1, opacity: -1, error: 1};
    }
    var res,
        red,
        green,
        blue,
        opacity,
        t,
        values,
        rgb = colour.match(colourRegExp);
    if (rgb) {
      if (rgb[2]) {
        blue = parseInt(rgb[2].substring(5), 16);
        green = parseInt(rgb[2].substring(3, 5), 16);
        red = parseInt(rgb[2].substring(1, 3), 16);
      }
      if (rgb[3]) {
        blue = parseInt((t = rgb[3].charAt(3)) + t, 16);
        green = parseInt((t = rgb[3].charAt(2)) + t, 16);
        red = parseInt((t = rgb[3].charAt(1)) + t, 16);
      }
      if (rgb[4]) {
        values = rgb[4].split(commaSpaces);
        red = parseFloat(values[0]);
        values[0].slice(-1) == "%" && (red *= 2.55);
        green = parseFloat(values[1]);
        values[1].slice(-1) == "%" && (green *= 2.55);
        blue = parseFloat(values[2]);
        values[2].slice(-1) == "%" && (blue *= 2.55);
        rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = parseFloat(values[3]));
        values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
      }
      if (rgb[5]) {
        values = rgb[5].split(commaSpaces);
        red = parseFloat(values[0]);
        values[0].slice(-1) == "%" && (red /= 100);
        green = parseFloat(values[1]);
        values[1].slice(-1) == "%" && (green /= 100);
        blue = parseFloat(values[2]);
        values[2].slice(-1) == "%" && (blue /= 100);
        (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360);
        rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = parseFloat(values[3]));
        values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
        return hsb2rgb(red, green, blue, opacity);
      }
      if (rgb[6]) {
        values = rgb[6].split(commaSpaces);
        red = parseFloat(values[0]);
        values[0].slice(-1) == "%" && (red /= 100);
        green = parseFloat(values[1]);
        values[1].slice(-1) == "%" && (green /= 100);
        blue = parseFloat(values[2]);
        values[2].slice(-1) == "%" && (blue /= 100);
        (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\xb0") && (red /= 360);
        rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = parseFloat(values[3]));
        values[3] && values[3].slice(-1) == "%" && (opacity /= 100);
        return hsl2rgb(red, green, blue, opacity);
      }
      red = Math.min(Math.round(red), 255);
      green = Math.min(Math.round(green), 255);
      blue = Math.min(Math.round(blue), 255);
      opacity = Math.min(Math.max(opacity, 0), 1);
      rgb = {r: red, g: green, b: blue};
      rgb.opacity = isFinite(opacity) ? opacity : 1;
      return rgb;
    }
    return {r: -1, g: -1, b: -1, opacity: -1, error: 1};
  }