Applying Color to Formula Parts/text/smath/guide/color.xhpColor in formulas
Applying Color to Formula Parts
Use the command color to apply color to the subsequent formula part.The example below creates a formula where a is shown using the default color (black) and b is shown in red.
a + color red b
Beware that the color command only changes the color of the formula part that comes immediately after it. For example, in the formula below only b will be shown in red, whereas c will be shown in black.
a + color red b + c
Use braces to apply color to more parts of the formula. In the following example, b and c are shown in red.
a + color red { b + c }
A list with predefined color names is available here.RGB colors
Using RGB colors
Use the command color rgb to apply colors using RGB (Red, Green, Blue) values.
color rgb 192 0 128 var
RGB values range between 0 and 255.Hex colors
Using hex notation
Use the command color hex to apply colors using the hexadecimal notation.
color hex C00080 var
Combining color with other commands
It is possible to combine the color command with other commands as bold, italic or size.The example below writes var in bold blue:
color blue bold var
To change color and font size, use color in combination with size and the desired font size.
color blue size 20 var
List of predefined colors
Predefined color names
%PRODUCTNAME provides a set of predefined color names that can be used along with the color command.