Applying Color to Formula Parts

Utilitzeu l'ordre color per a acolorir parts successives de la fórmula.

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 }

tip

A list with predefined color names is available here.


Using RGB colors

Use the command color rgb to apply colors using RGB (Red, Green, Blue) values.

color rgb 192 0 128 var

note

RGB values range between 0 and 255.


Ús de la notació hexadecimal

Use the command color hex to apply colors using the hexadecimal notation.

color hex C00080 var

Combining color with other commands

És possible combinar l'ordre de color amb d'altres, com ara bold, italic o 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

Noms dels colors predefinits

LibreOffice provides a set of predefined color names that can be used along with the color command.

Markup language

Color

Valor hexadecimal

Valors RGB

aqua o cyan

Aigua

00FFFF

rgb(0, 255, 255)

black

Negre

000000

rgb(0, 0, 0)

blue

Blau

0000FF

rgb(0, 0, 255)

coral

Corall

FF7F50

rgb(255, 127, 80)

crimson

Carmesí

DC143C

rgb(220, 20, 60)

fuchsia o magenta

Fúcsia

FF00FF

rgb(255, 0, 255)

gray o grey

Gris

808080

rgb(128, 128, 128)

green

Verd

008000

rgb(0, 128, 0)

hotpink

Rosa càlid

FF69B4

rgb(255, 105, 180)

indigo

Indi

4B0082

rgb(75, 0, 130)

lavender

Lavanda

E6E6FA

rgb(230, 230, 250)

lime

Llimona

00FF00

rgb(0, 255, 0)

maroon

Granat

800000

rgb(128, 0, 0)

midnightblue

Mitjanit

191970

rgb(25, 25, 112)

navy

Blau marí

000080

rgb(0, 0, 128)

olive

Verd oliva

808000

rgb(128, 128, 0)

orange

Taronja

FFA500

rgb(255, 165, 0)

orangered

Taronja vermellós

FF4500

rgb(255, 69, 0)

purple

Porpra

0x800080

rgb(128, 0, 128)

red

Vermell

FF0000

rgb(255, 0, 0)

seagreen

Verd marí

2E8B57

rgb(46, 139, 87)

silver

Argentat

C0C0C0

rgb(192, 192, 192)

teal

Jade

008080

rgb(0, 128, 128)

violet

Violeta

EE82EE

rgb(238, 130, 238)

yellow

Groc

FFFF00

rgb(255, 255, 0)