Gets the color of the text of the object.
HRESULT IHTMLCurrentStyle::get_color(VARIANT *p);
- Pointer to a variable of type VARIANT of type VT_BSTR or VT_I4 that receives one of the color names or RGB values in the Color Table.
Returns S_OK if successful, or an error value otherwise.
Some browsers do not recognize color names, but all browsers should recognize RGB color values and display them correctly.
Internet Explorer 9 introduces support for the RGBA, HSL, and HSLA color models.
In Internet Explorer 9, the RGB color model has been extended to include an alpha channel, or transparency. The format of an RGBA value is
rgba(red,green,blue,alpha). The red, green, and blue components are identical to those of the RGB color model, and are expressed as integers or percentages. The alpha component is expressed as a value between 0.0 (completely transparent) and 1.0 (completely opaque).
Internet Explorer 9 supports hue-saturation-lightness (HSL) color values. The format of an HSL value is
hsl(hue,saturation,lightness). In the HSL color model, "hue" is defined as the indicated color's angle on the color wheel (for instance, red is 0 or 360, green is 120, blue is 240, and so on). "Saturation" and "lightness" are expressed as percentages.
Internet Explorer 9 also extends the HSL color model with an alpha channel. As with the RGBA model, the alpha channel is expressed as a value between 0.0 and 1.0. The format of an HSLA value is