Mar 21, 2015

I was playing around with mathjax the other day and I stumbled upon a way of adding color to a text.

I don't know if this could actually be useful or not, but I already know where I'll use color - stoichiometric coefficients, mole ratios, stuff like that.

The syntax looks like this

color(whatever color you want)(whatever text or math you want)

Here are some examples

• without the hashtags

color(red)(2 + 2 + 2)

• with the hashtags

$\textcolor{red}{2 + 2 + 2}$

• without the hashtags

color(blue)(2 + 2 + 2)

• with the hashtags

$\textcolor{b l u e}{2 + 2 + 2}$

Other examples:

$\textcolor{g r e e n}{a {x}^{2} + b x + c}$

$\textcolor{red}{2} {C}_{2} {H}_{6} + \textcolor{b l u e}{7} {O}_{2} \to \textcolor{g r e e n}{4} C {O}_{2} + \textcolor{p u r p \le}{6} {H}_{2} O$

If you use color(black)(whatever), it will act as a regular bold text

$\textcolor{b l a c k}{\text{Testing, testing...}}$

You can use color(white)(text) to write invisible characters. This is very useful for spacing issues

• without the hashtags

color(white)(222)

• with the hashtags

$\textcolor{w h i t e}{222} \to$ you can't see it, but it's there! Highlight it using your mouse!

Jun 18, 2015

Put hashtags around the following:

(color)("the type of color you want")("text you want to color")

#### Explanation:

For example, if I wanted to color the equation ${x}^{2} + 1$

hashtag (color)(blue)(x^2+1) hashtag

$\textcolor{b l u e}{{x}^{2} + 1}$

hashtag (color)(green)(x^2+1) hashtag

$\textcolor{g r e e n}{{x}^{2} + 1}$

hashtag (color)(red)(x^2+1) hashtag

$\textcolor{red}{{x}^{2} + 1}$

Press the edit answer button for this question if you want to take a look at the code.

Sep 27, 2016

This is an old (but still useful) answer; here are the possible values for "color" that can be used. Obviously many of these are too light to be useful. (Thanks to Tony B for suggesting these).

#### Explanation:

aliceblue: $\textcolor{a l i c e b l u e}{\text{aliceblue}}$

antiquewhite: $\textcolor{a n t i q u e w h i t e}{\text{antiquewhite}}$

aqua: $\textcolor{a q u a}{\text{aqua}}$

aquamarine: $\textcolor{a q u a m a r \in e}{\text{aquamarine}}$

azure: $\textcolor{a z u r e}{\text{azure}}$

beige: $\textcolor{b e i \ge}{\text{beige}}$

bisque: $\textcolor{b i s q u e}{\text{bisque}}$

black: $\textcolor{b l a c k}{\text{black}}$

blanchedalmond: $\textcolor{b l a n c h e \mathrm{da} l m o n d}{\text{blanchedalmond}}$

blue: $\textcolor{b l u e}{\text{blue}}$

blueviolet: $\textcolor{b l u e v i o \le t}{\text{blueviolet}}$

brown: $\textcolor{b r o w n}{\text{brown}}$

burlywood: $\textcolor{b u r l y w \infty d}{\text{burlywood}}$

cadetblue: $\textcolor{c a \det b l u e}{\text{cadetblue}}$

chartreuse: $\textcolor{c h a r t r e u s e}{\text{chartreuse}}$

chocolate: $\textcolor{c h o c o l a t e}{\text{chocolate}}$

coral: $\textcolor{c \mathmr{and} a l}{\text{coral}}$

cornflowerblue: $\textcolor{c \mathmr{and} n f l o w e r b l u e}{\text{cornflowerblue}}$

cornsilk: $\textcolor{c \mathmr{and} n s i l k}{\text{cornsilk}}$

crimson: $\textcolor{c r i m s o n}{\text{crimson}}$

cyan: $\textcolor{c y a n}{\text{cyan}}$

darkblue: $\textcolor{\mathrm{da} r k b l u e}{\text{darkblue}}$

darkcyan: $\textcolor{\mathrm{da} r k c y a n}{\text{darkcyan}}$

darkgoldenrod: $\textcolor{\mathrm{da} r k g o l \mathrm{de} n r o d}{\text{darkgoldenrod}}$

darkgray: $\textcolor{\mathrm{da} r k g r a y}{\text{darkgray}}$

darkgreen: $\textcolor{\mathrm{da} r k g r e e n}{\text{darkgreen}}$

darkkhaki: $\textcolor{\mathrm{da} r k k h a k i}{\text{darkkhaki}}$

darkmagenta: $\textcolor{\mathrm{da} r k m a \ge n t a}{\text{darkmagenta}}$

darkolivegreen: $\textcolor{\mathrm{da} r k o l i v e g r e e n}{\text{darkolivegreen}}$

darkorange: $\textcolor{\mathrm{da} r k \mathmr{and} a n \ge}{\text{darkorange}}$

darkorchid: $\textcolor{\mathrm{da} r k \mathmr{and} \chi d}{\text{darkorchid}}$

darkred: $\textcolor{\mathrm{da} r k red}{\text{darkred}}$

darksalmon: $\textcolor{\mathrm{da} r k s a l m o n}{\text{darksalmon}}$

darkseagreen: $\textcolor{\mathrm{da} r k s e a g r e e n}{\text{darkseagreen}}$

darkslateblue: $\textcolor{\mathrm{da} r k s l a t e b l u e}{\text{darkslateblue}}$

darkslategray: $\textcolor{\mathrm{da} r k s l a t e g r a y}{\text{darkslategray}}$

darkturquoise: $\textcolor{\mathrm{da} r k t u r q u o i s e}{\text{darkturquoise}}$

darkviolet: $\textcolor{\mathrm{da} r k v i o \le t}{\text{darkviolet}}$

deeppink: $\textcolor{\mathrm{de} e p \pi n k}{\text{deeppink}}$

deepskyblue: $\textcolor{\mathrm{de} e p s k y b l u e}{\text{deepskyblue}}$

dimgray: $\textcolor{\dim g r a y}{\text{dimgray}}$

dodgerblue: $\textcolor{\mathrm{do} \mathrm{dg} e r b l u e}{\text{dodgerblue}}$

firebrick: $\textcolor{f i r e b r i c k}{\text{firebrick}}$

floralwhite: $\textcolor{f l \mathmr{and} a l w h i t e}{\text{floralwhite}}$

forestgreen: $\textcolor{f \mathmr{and} e s t g r e e n}{\text{forestgreen}}$

fuchsia: $\textcolor{f u c h s i a}{\text{fuchsia}}$

gainsboro: $\textcolor{g a \in s b \mathmr{and} o}{\text{gainsboro}}$

ghostwhite: $\textcolor{g h o s t w h i t e}{\text{ghostwhite}}$

gold: $\textcolor{g o l d}{\text{gold}}$

goldenrod: $\textcolor{g o l \mathrm{de} n r o d}{\text{goldenrod}}$

gray: $\textcolor{g r a y}{\text{gray}}$

green: $\textcolor{g r e e n}{\text{green}}$

greenyellow: $\textcolor{g r e e n y e l l o w}{\text{greenyellow}}$

honeydew: $\textcolor{h o \ne y \mathrm{de} w}{\text{honeydew}}$

hotpink: $\textcolor{h o t \pi n k}{\text{hotpink}}$

indianred: $\textcolor{\in \mathrm{di} a n red}{\text{indianred}}$

indigo: $\textcolor{\in \mathrm{di} g o}{\text{indigo}}$

ivory: $\textcolor{i v \mathmr{and} y}{\text{ivory}}$

khaki: $\textcolor{k h a k i}{\text{khaki}}$

lavender: $\textcolor{l a v e n \mathrm{de} r}{\text{lavender}}$

lavenderblush: $\textcolor{l a v e n \mathrm{de} r b l u s h}{\text{lavenderblush}}$

lawngreen: $\textcolor{l a w n g r e e n}{\text{lawngreen}}$

lemonchiffon: $\textcolor{\le m o n \chi f f o n}{\text{lemonchiffon}}$

lightblue: $\textcolor{l i g h t b l u e}{\text{lightblue}}$

lightcoral: $\textcolor{l i g h t c \mathmr{and} a l}{\text{lightcoral}}$

lightcyan: $\textcolor{l i g h t c y a n}{\text{lightcyan}}$

lightgoldenrodyellow: $\textcolor{l i g h t g o l \mathrm{de} n r o \mathrm{dy} e l l o w}{\text{lightgoldenrodyellow}}$

lightgreen: $\textcolor{l i g h t g r e e n}{\text{lightgreen}}$

lightgray: $\textcolor{l i g h t g r a y}{\text{lightgray}}$

lightmagenta: $\textcolor{l i g h t m a \ge n t a}{\text{lightmagenta}}$

lightpink: $\textcolor{l i g h t \pi n k}{\text{lightpink}}$

lightsalmon: $\textcolor{l i g h t s a l m o n}{\text{lightsalmon}}$

lightseagreen: $\textcolor{l i g h t s e a g r e e n}{\text{lightseagreen}}$

lightskyblue: $\textcolor{l i g h t s k y b l u e}{\text{lightskyblue}}$

lightslategray: $\textcolor{l i g h t s l a t e g r a y}{\text{lightslategray}}$

lightsteelblue: $\textcolor{l i g h t s t e e l b l u e}{\text{lightsteelblue}}$

lightyellow: $\textcolor{l i g h t y e l l o w}{\text{lightyellow}}$

lime: $\textcolor{\lim e}{\text{lime}}$

limegreen: $\textcolor{\lim e g r e e n}{\text{limegreen}}$

linen: $\textcolor{l \in e n}{\text{linen}}$

magenta: $\textcolor{m a \ge n t a}{\text{magenta}}$

maroon: $\textcolor{m a r \infty n}{\text{maroon}}$

mediumaquamarine: $\textcolor{m e \mathrm{di} u m a q u a m a r \in e}{\text{mediumaquamarine}}$

mediumblue: $\textcolor{m e \mathrm{di} u m b l u e}{\text{mediumblue}}$

mediumorchid: $\textcolor{m e \mathrm{di} u m \mathmr{and} \chi d}{\text{mediumorchid}}$

mediumpurple: $\textcolor{m e \mathrm{di} u m p u r p \le}{\text{mediumpurple}}$

mediumseagreen: $\textcolor{m e \mathrm{di} u m s e a g r e e n}{\text{mediumseagreen}}$

mediumslateblue: $\textcolor{m e \mathrm{di} u m s l a t e b l u e}{\text{mediumslateblue}}$

mediumspringgreen: $\textcolor{m e \mathrm{di} u m s p r \in g g r e e n}{\text{mediumspringgreen}}$

mediumturquoise: $\textcolor{m e \mathrm{di} u m t u r q u o i s e}{\text{mediumturquoise}}$

mediumvioletred: $\textcolor{m e \mathrm{di} u m v i o \le t red}{\text{mediumvioletred}}$

midnightblue: $\textcolor{m i \mathrm{dn} i g h t b l u e}{\text{midnightblue}}$

mintcream: $\textcolor{\min t c r e a m}{\text{mintcream}}$

mistyrose: $\textcolor{m i s t y r o s e}{\text{mistyrose}}$

moccasin: $\textcolor{m o \mathcal{a} \sin}{\text{moccasin}}$

navajowhite: $\textcolor{n a v a j o w h i t e}{\text{navajowhite}}$

navy: $\textcolor{n a v y}{\text{navy}}$

oldlace: $\textcolor{o l \mathrm{dl} a c e}{\text{oldlace}}$

olive: $\textcolor{o l i v e}{\text{olive}}$

olivedrab: $\textcolor{o l i v e \mathrm{dr} a b}{\text{olivedrab}}$

orange: $\textcolor{\mathmr{and} a n \ge}{\text{orange}}$

orangered: $\textcolor{\mathmr{and} a n \ge red}{\text{orangered}}$

orchid: $\textcolor{\mathmr{and} \chi d}{\text{orchid}}$

palegoldenrod: $\textcolor{p a \le g o l \mathrm{de} n r o d}{\text{palegoldenrod}}$

palegreen: $\textcolor{p a \le g r e e n}{\text{palegreen}}$

paleturquoise: $\textcolor{p a \le t u r q u o i s e}{\text{paleturquoise}}$

palevioletred: $\textcolor{p a \le v i o \le t red}{\text{palevioletred}}$

papayawhip: $\textcolor{p a p a y a w h i p}{\text{papayawhip}}$

peachpuff: $\textcolor{p e a c h p u f f}{\text{peachpuff}}$

peru: $\textcolor{p e r u}{\text{peru}}$

pink: $\textcolor{\pi n k}{\text{pink}}$

plum: $\textcolor{p l u m}{\text{plum}}$

powderblue: $\textcolor{p o w \mathrm{de} r b l u e}{\text{powderblue}}$

purple: $\textcolor{p u r p \le}{\text{purple}}$

red: $\textcolor{red}{\text{red}}$

rosybrown: $\textcolor{r o s y b r o w n}{\text{rosybrown}}$

royalblue: $\textcolor{r o y a l b l u e}{\text{royalblue}}$

saddlebrown: $\textcolor{s a \mathrm{dd} \le b r o w n}{\text{saddlebrown}}$

salmon: $\textcolor{s a l m o n}{\text{salmon}}$

sandybrown: $\textcolor{s \mathmr{and} y b r o w n}{\text{sandybrown}}$

seagreen: $\textcolor{s e a g r e e n}{\text{seagreen}}$

seashell: $\textcolor{s e a s h e l l}{\text{seashell}}$

sienna: $\textcolor{s i e \cap a}{\text{sienna}}$

silver: $\textcolor{s i l v e r}{\text{silver}}$

skyblue: $\textcolor{s k y b l u e}{\text{skyblue}}$

slateblue: $\textcolor{s l a t e b l u e}{\text{slateblue}}$

slategray: $\textcolor{s l a t e g r a y}{\text{slategray}}$

snow: $\textcolor{s n o w}{\text{snow}}$

springgreen: $\textcolor{s p r \in g g r e e n}{\text{springgreen}}$

steelblue: $\textcolor{s t e e l b l u e}{\text{steelblue}}$

tan: $\textcolor{\tan}{\text{tan}}$

teal: $\textcolor{t e a l}{\text{teal}}$

thistle: $\textcolor{t h i s t \le}{\text{thistle}}$

tomato: $\textcolor{\to m a \to}{\text{tomato}}$

turquoise: $\textcolor{t u r q u o i s e}{\text{turquoise}}$

violet: $\textcolor{v i o \le t}{\text{violet}}$

wheat: $\textcolor{w h e a t}{\text{wheat}}$

white: $\textcolor{w h i t e}{\text{white}}$

whitesmoke: $\textcolor{w h i t e s m o k e}{\text{whitesmoke}}$

yellow: $\textcolor{y e l l o w}{\text{yellow}}$

yellowgreen: $\textcolor{y e l l o w g r e e n}{\text{yellowgreen}}$