docs: function inputToRGB(color) {
  
          var rgb = { r: 0, g: 0, b: 0 };
          var a = 1;
          var ok = false;
          var format = false;
  
          if (typeof color == "string") {
              color = stringInputToObject(color);
          }
  
          if (typeof color == "object") {
              if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) {
                  rgb = rgbToRgb(color.r, color.g, color.b);
                  ok = true;
                  format = "rgb";
              }
              else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
                  rgb = hsvToRgb(color.h, color.s, color.v);
                  ok = true;
                  format = "hsv";
              }
              else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
                  var rgb = hslToRgb(color.h, color.s, color.l);
                  ok = true;
                  format = "hsl";
              }
  
              if (color.hasOwnProperty("a")) {
                  a = color.a;
              }
          }
  
          rgb.r = mathMin(255, mathMax(rgb.r, 0));
          rgb.g = mathMin(255, mathMax(rgb.g, 0));
          rgb.b = mathMin(255, mathMax(rgb.b, 0));
  
  
          // Don't let the range of [0,255] come back in [0,1].  
          // Potentially lose a little bit of precision here, but will fix issues where
          // .5 gets interpreted as half of the total, instead of half of 1.
          // If it was supposed to be 128, this was already taken care of in the conversion function
          if (rgb.r < 1) { rgb.r = mathRound(rgb.r); }
          if (rgb.g < 1) { rgb.g = mathRound(rgb.g); }
          if (rgb.b < 1) { rgb.b = mathRound(rgb.b); }
  
          return {
              ok: ok,
              format: (color && color.format) || format,
              r: rgb.r,
              g: rgb.g,
              b: rgb.b,
              a: a
          };
      }