# MathML Fundamentals - Color Valued Attributes

A color is specified either by "#" followed by hexadecimal values for the red, green, and blue components, with no intervening whitespace, or by an html-color-name. The color components can be either 1-digit or 2-digit, but must all have the same number of digits; the component ranges from 0 (component not present) to FF (component fully present). When a color is applied to an element, it is the color in which the content of tokens is rendered. Additionally, when inherited from a surrounding element or from the environment in which the complete MathML expression is embedded, it controls the color of all other drawing due to MathML elements, including the lines or radical signs that can be drawn in rendering mfrac, mtable, or msqrt. MathML Fundamentals

### $\text{MathML Fundamentals - Color Valued Attributes}\phantom{\rule{0ex}{0ex}}\text{#RGB red:}\phantom{\rule{1em}{1em}}\text{green:}\phantom{\rule{1em}{1em}}\text{blue:}\phantom{\rule{1em}{1em}}\phantom{\rule{0ex}{0ex}}\text{#RRGGBB red:}\phantom{\rule{1em}{1em}}\text{green:}\phantom{\rule{1em}{1em}}\text{blue:}\phantom{\rule{1em}{1em}}\phantom{\rule{0ex}{0ex}}\text{HTML colors:}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}\phantom{\rule{20}{1em}}$

#### MathML

```[itex]
<mtext style="border:1px;" mathsize="50">MathML Fundamentals - Color Valued Attributes</mtext>
<mspace linebreak="newline" indentalign="center"></mspace>
<mrow style="border:1px">
<mtext>#RGB red:</mtext>
<mspace style="border:1px;" mathbackground="#f00" width="1em" height="1em"></mspace>
<mtext>green:</mtext>
<mspace style="border:1px;" mathbackground="#0f0" width="1em" height="1em"></mspace>
<mtext>blue:</mtext>
<mspace style="border:1px;" mathbackground="#00f" width="1em" height="1em"></mspace>
</mrow>
<mspace linebreak="newline" indentalign="center"></mspace>
<mrow style="border:1px">
<mtext>#RRGGBB red:</mtext>
<mspace style="border:1px;" mathbackground="#ff0000" width="1em" height="1em"></mspace>
<mtext>green:</mtext>
<mspace style="border:1px;" mathbackground="#00ff00" width="1em" height="1em"></mspace>
<mtext>blue:</mtext>
<mspace style="border:1px;" mathbackground="#0000ff" width="1em" height="1em"></mspace>
</mrow>
<mspace linebreak="newline" indentalign="center"></mspace>
<mrow style="border:1px">
<mtext>HTML colors:</mtext>
<mspace style="border:1px;" mathbackground="aQua" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="black" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="blue" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="fuchsia" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="gray" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="green" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="lime" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="maroon" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="navy" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="olive" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="purple" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="red" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="silver" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="teal" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="white" width="20" height="1em"></mspace>
<mspace style="border:1px;" mathbackground="yellow" width="20" height="1em"></mspace>
</mrow>
[/itex]
```