LibreOffice 24.8 帮助
使用color命令将颜色应用于其后接的公式部分。
下面的示例创建了一个公式,其中使用默认颜色(黑色)显示a,以红色显示b。
a + color red b
Be aware 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
使用大括号将颜色应用于公式的更多部分。在以下示例中,b和c显示为红色。
a + color red { b + c }
此处提供了带有预定义颜色名称的列表。
使用“color rgb”命令可以使用RGB(红色、绿色、蓝色)值应用颜色。
color rgb 192 0 128 var
RGB值范围在0到255之间。
使用命令color hex以十六进制表示法应用颜色。
color hex C00080 var
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
LibreOffice provides a set of predefined color names that can be used along with the color command.
| Markup language | Color | Hex value | RGB values | 
|---|---|---|---|
| aqua or cyan | Aqua | 00FFFF | rgb(0, 255, 255) | 
| black | Black | 000000 | rgb(0, 0, 0) | 
| blue | Blue | 0000FF | rgb(0, 0, 255) | 
| coral | Coral | FF7F50 | rgb(255, 127, 80) | 
| crimson | Crimson | DC143C | rgb(220, 20, 60) | 
| fuchsia or magenta | Fuchsia | FF00FF | rgb(255, 0, 255) | 
| gray or grey | Gray | 808080 | rgb(128, 128, 128) | 
| green | Green | 008000 | rgb(0, 128, 0) | 
| hotpink | Hot pink | FF69B4 | rgb(255, 105, 180) | 
| indigo | Indigo | 4B0082 | rgb(75, 0, 130) | 
| lavender | Lavender | E6E6FA | rgb(230, 230, 250) | 
| lime | Lime | 00FF00 | rgb(0, 255, 0) | 
| maroon | Maroon | 800000 | rgb(128, 0, 0) | 
| midnightblue | Midnight | 191970 | rgb(25, 25, 112) | 
| navy | Navy | 000080 | rgb(0, 0, 128) | 
| olive | Olive | 808000 | rgb(128, 128, 0) | 
| orange | Orange | FFA500 | rgb(255, 165, 0) | 
| orangered | Orange red | FF4500 | rgb(255, 69, 0) | 
| purple | Purple | 0x800080 | rgb(128, 0, 128) | 
| red | Red | FF0000 | rgb(255, 0, 0) | 
| seagreen | Sea green | 2E8B57 | rgb(46, 139, 87) | 
| silver | Silver | C0C0C0 | rgb(192, 192, 192) | 
| teal | Teal | 008080 | rgb(0, 128, 128) | 
| violet | Violet | EE82EE | rgb(238, 130, 238) | 
| yellow | Yellow | FFFF00 | rgb(255, 255, 0) |