function unhexScalar(hex) {
      var value = parseInt("0x" + hex, 16);

      // correct for int overflow java expectation
      if (value > 2147483647) {
        value -= 4294967296;
      }
      return value;
    }
Converts a byte, char, int, or color to a String containing the equivalent hexadecimal notation.
For example color(0, 102, 153, 255) will convert to the String "FF006699". This function can help
make your geeky debugging sessions much happier.

@param {byte|char|int|Color} value   the value to turn into a hex string
@param {int} digits                 the number of digits to return

@returns {String}

@see unhex
@see binary
@see unbinary