code: function parseColor(color, contrast) {
        contrast = contrast || false;
        var rgbValues = $mdTheming.PALETTES[color.palette][color.hue];
  
        rgbValues = contrast ? rgbValues.contrast : rgbValues.value;
  
        return $mdUtil.supplant('rgba({0}, {1}, {2}, {3})',
          [rgbValues[0], rgbValues[1], rgbValues[2], rgbValues[3] || color.opacity]
        );
      }
docs: Return the parsed color
  @param {{hue: *, theme: any, palette: *, opacity: (*|string|number)}} color hash map of color
  definitions
  @param {boolean=} contrast whether use contrast color for foreground. Defaults to false.
  @returns {string} rgba color string