code: function(color) {
              var normalizedColor = Splunk.util.normalizeColor(color);
  
              return (normalizedColor) ? parseInt(normalizedColor.replace("#", "0x"), 16) : 0;
          }
docs: coverts a color string in either hex or rgb format into its corresponding hex number returns zero if the color string can't be parsed as either format