color attribute

Used By:datacurve, gdata, simplecurve, All text elements
See:background-color border-color

This property describes the foreground color of an element's text content. It can be set to any valid color, but it must be set to something ("none" or "transparent" are invalid).

The attribute is inherited, so it can be set on the body tag (for example) to set the text color for the entire document.

This sets the color for all text in the document to black, except for paragraphs with a class of "redtext", which are set to bright red.

body { color:black; }
p.redtext { color:rgb(100%, 0, 0); }

This example shows how to control the colors in a PieGraph

<piegraph width="100" height="100">
  <gdata name="red" value="10" color="red"/>
  <gdata name="yellow" value="10" color="yellow"/>
  <gdata name="blue" value="10" color="blue"/>