liweimu的个人博客分享 http://blog.sciencenet.cn/u/liweimu

博文

Latex中如何设置颜色

已有 14078 次阅读 2022-3-18 19:42 |系统分类:科普集锦

在用Latex时,若想用不同颜色来突出某些关键字,两种参考方法:


1.组合red、green和blue的值合成我们想要的颜色

\usepackage{color}

\textcolor[rgb]{r,g,b}{text}

其中{r,g,b}代表red、green和blue三种颜色的组合,取值范围为[0-1]


latex菜单: Insert→font-→Color(RGB)→选择指定的颜色即可。


2.定义一种颜色,直接调用

\usepackage{xcolor}

\definecolor{ColorName}{RGB}{r,g,b}

\color{ColorName}{text}


注意:r/g/b的定义域在[0-255],RGB大写。


常用RGB颜色表

实色效果英文名称R.G.B16色实色效果英文名称R.G.B16色

Snow255 250 250#FFFAFA
PaleTurquoise1187 255 255#BBFFFF

GhostWhite248 248 255#F8F8FF
PaleTurquoise2174 238 238#AEEEEE

WhiteSmoke245 245 245#F5F5F5
PaleTurquoise3150 205 205#96CDCD

Gainsboro220 220 220#DCDCDC
PaleTurquoise4102 139 139#668B8B

FloralWhite255 250 240#FFFAF0
CadetBlue1152 245 255#98F5FF

OldLace253 245 230#FDF5E6
CadetBlue2142 229 238#8EE5EE

Linen250 240 230#FAF0E6
CadetBlue3122 197 205#7AC5CD

AntiqueWhite250 235 215#FAEBD7
CadetBlue483 134 139#53868B

PapayaWhip255 239 213#FFEFD5
Turquoise10 245 255#00F5FF

BlanchedAlmond255 235 205#FFEBCD
Turquoise20 229 238#00E5EE

Bisque255 228 196#FFE4C4
Turquoise30 197 205#00C5CD

PeachPuff255 218 185#FFDAB9
Turquoise40 134 139#00868B

NavajoWhite255 222 173#FFDEAD
Cyan10 255 255#00FFFF

Moccasin255 228 181#FFE4B5
Cyan20 238 238#00EEEE

Cornsilk255 248 220#FFF8DC
Cyan30 205 205#00CDCD

Ivory255 255 240#FFFFF0
Cyan40 139 139#008B8B

LemonChiffon255 250 205#FFFACD
DarkSlateGray1151 255 255#97FFFF

Seashell255 245 238#FFF5EE
DarkSlateGray2141 238 238#8DEEEE

Honeydew240 255 240#F0FFF0
DarkSlateGray3121 205 205#79CDCD

MintCream245 255 250#F5FFFA
DarkSlateGray482 139 139#528B8B

Azure240 255 255#F0FFFF
Aquamarine1127 255 212#7FFFD4

AliceBlue240 248 255#F0F8FF
Aquamarine2118 238 198#76EEC6

lavender230 230 250#E6E6FA
Aquamarine3102 205 170#66CDAA

LavenderBlush255 240 245#FFF0F5
Aquamarine469 139 116#458B74

MistyRose255 228 225#FFE4E1
DarkSeaGreen1193 255 193#C1FFC1

White255 255 255#FFFFFF
DarkSeaGreen2180 238 180#B4EEB4

Black0 0 0#000000
DarkSeaGreen3155 205 155#9BCD9B

DarkSlateGray47 79 79#2F4F4F
DarkSeaGreen4105 139 105#698B69

DimGrey105 105 105#696969
SeaGreen184 255 159#54FF9F

SlateGrey112 128 144#708090
SeaGreen278 238 148#4EEE94

LightSlateGray119 136 153#778899
SeaGreen367 205 128#43CD80

Grey190 190 190#BEBEBE
SeaGreen446 139 87#2E8B57

LightGray211 211 211#D3D3D3
PaleGreen1154 255 154#9AFF9A

MidnightBlue25 25 112#191970
PaleGreen2144 238 144#90EE90

NavyBlue0 0 128#000080
PaleGreen3124 205 124#7CCD7C

CornflowerBlue100 149 237#6495ED
PaleGreen484 139 84#548B54

DarkSlateBlue72 61 139#483D8B
SpringGreen10 255 127#00FF7F

SlateBlue106 90 205#6A5ACD
SpringGreen20 238 118#00EE76

MediumSlateBlue123 104 238#7B68EE
SpringGreen30 205 102#00CD66

LightSlateBlue132 112 255#8470FF
SpringGreen40 139 69#008B45

MediumBlue0 0 205#0000CD
Green10 255 0#00FF00

RoyalBlue65 105 225#4169E1
Green20 238 0#00EE00

Blue0 0 255#0000FF
Green30 205 0#00CD00

DodgerBlue30 144 255#1E90FF
Green40 139 0#008B00

DeepSkyBlue0 191 255#00BFFF
Chartreuse1127 255 0#7FFF00

SkyBlue135 206 235#87CEEB
Chartreuse2118 238 0#76EE00

LightSkyBlue135 206 250#87CEFA
Chartreuse3102 205 0#66CD00

SteelBlue70 130 180#4682B4
Chartreuse469 139 0#458B00

LightSteelBlue176 196 222#B0C4DE
OliveDrab1192 255 62#C0FF3E

LightBlue173 216 230#ADD8E6
OliveDrab2179 238 58#B3EE3A

PowderBlue176 224 230#B0E0E6
OliveDrab3154 205 50#9ACD32

PaleTurquoise175 238 238#AFEEEE
OliveDrab4105 139 34#698B22

DarkTurquoise0 206 209#00CED1
DarkOliveGreen1202 255 112#CAFF70

MediumTurquoise72 209 204#48D1CC
DarkOliveGreen2188 238 104#BCEE68

Turquoise64 224 208#40E0D0
DarkOliveGreen3162 205 90#A2CD5A

Cyan0 255 255#00FFFF
DarkOliveGreen4110 139 61#6E8B3D

LightCyan224 255 255#E0FFFF
Khaki1255 246 143#FFF68F

CadetBlue95 158 160#5F9EA0
Khaki2238 230 133#EEE685

MediumAquamarine102 205 170#66CDAA
Khaki3205 198 115#CDC673

Aquamarine127 255 212#7FFFD4
Khaki4139 134 78#8B864E

DarkGreen0 100 0#006400
LightGoldenrod1255 236 139#FFEC8B

DarkOliveGreen85 107 47#556B2F
LightGoldenrod2238 220 130#EEDC82

DarkSeaGreen143 188 143#8FBC8F
LightGoldenrod3205 190 112#CDBE70

SeaGreen46 139 87#2E8B57
LightGoldenrod4139 129 76#8B814C

MediumSeaGreen60 179 113#3CB371
LightYellow1255 255 224#FFFFE0

LightSeaGreen32 178 170#20B2AA
LightYellow2238 238 209#EEEED1

PaleGreen152 251 152#98FB98
LightYellow3205 205 180#CDCDB4

SpringGreen0 255 127#00FF7F
LightYellow4139 139 122#8B8B7A

LawnGreen124 252 0#7CFC00
Yellow1255 255 0#FFFF00

Green0 255 0#00FF00
Yellow2238 238 0#EEEE00

Chartreuse127 255 0#7FFF00
Yellow3205 205 0#CDCD00

MedSpringGreen0 250 154#00FA9A
Yellow4139 139 0#8B8B00

GreenYellow173 255 47#ADFF2F
Gold1255 215 0#FFD700

LimeGreen50 205 50#32CD32
Gold2238 201 0#EEC900

YellowGreen154 205 50#9ACD32
Gold3205 173 0#CDAD00

ForestGreen34 139 34#228B22
Gold4139 117 0#8B7500

OliveDrab107 142 35#6B8E23
Goldenrod1255 193 37#FFC125

DarkKhaki189 183 107#BDB76B
Goldenrod2238 180 34#EEB422

PaleGoldenrod238 232 170#EEE8AA
Goldenrod3205 155 29#CD9B1D

LtGoldenrodYello250 250 210#FAFAD2
Goldenrod4139 105 20#8B6914

LightYellow255 255 224#FFFFE0
DarkGoldenrod1255 185 15#FFB90F

Yellow255 255 0#FFFF00
DarkGoldenrod2238 173 14#EEAD0E

Gold255 215 0#FFD700
DarkGoldenrod3205 149 12#CD950C

LightGoldenrod238 221 130#EEDD82
DarkGoldenrod4139 101 8#8B658B

goldenrod218 165 32#DAA520
RosyBrown1255 193 193#FFC1C1

DarkGoldenrod184 134 11#B8860B
RosyBrown2238 180 180#EEB4B4

RosyBrown188 143 143#BC8F8F
RosyBrown3205 155 155#CD9B9B

IndianRed205 92 92#CD5C5C
RosyBrown4139 105 105#8B6969

SaddleBrown139 69 19#8B4513
IndianRed1255 106 106#FF6A6A

Sienna160 82 45#A0522D
IndianRed2238 99 99#EE6363

Peru205 133 63#CD853F
IndianRed3205 85 85#CD5555

Burlywood222 184 135#DEB887
IndianRed4139 58 58#8B3A3A

Beige245 245 220#F5F5DC
Sienna1255 130 71#FF8247

Wheat245 222 179#F5DEB3
Sienna2238 121 66#EE7942

SandyBrown244 164 96#F4A460
Sienna3205 104 57#CD6839

Tan210 180 140#D2B48C
Sienna4139 71 38#8B4726

Chocolate210 105 30#D2691E
Burlywood1255 211 155#FFD39B

Firebrick178 34 34#B22222
Burlywood2238 197 145#EEC591

Brown165 42 42#A52A2A
Burlywood3205 170 125#CDAA7D

DarkSalmon233 150 122#E9967A
Burlywood4139 115 85#8B7355

Salmon250 128 114#FA8072
Wheat1255 231 186#FFE7BA

LightSalmon255 160 122#FFA07A
Wheat2238 216 174#EED8AE

Orange255 165 0#FFA500
Wheat3205 186 150#CDBA96

DarkOrange255 140 0#FF8C00
Wheat4139 126 102#8B7E66

Coral255 127 80#FF7F50
Tan1255 165 79#FFA54F

LightCoral240 128 128#F08080
Tan2238 154 73#EE9A49

Tomato255 99 71#FF6347
Tan3205 133 63#CD853F

OrangeRed255 69 0#FF4500
Tan4139 90 43#8B5A2B

Red255 0 0#FF0000
Chocolate1255 127 36#FF7F24

HotPink255 105 180#FF69B4
Chocolate2238 118 33#EE7621

DeepPink255 20 147#FF1493
Chocolate3205 102 29#CD661D

Pink255 192 203#FFC0CB
Chocolate4139 69 19#8B4513

LightPink255 182 193#FFB6C1
Firebrick1255 48 48#FF3030

PaleVioletRed219 112 147#DB7093
Firebrick2238 44 44#EE2C2C

Maroon176 48 96#B03060
Firebrick3205 38 38#CD2626

MediumVioletRed199 21 133#C71585
Firebrick4139 26 26#8B1A1A

VioletRed208 32 144#D02090
Brown1255 64 64#FF4040

Magenta255 0 255#FF00FF
Brown2238 59 59#EE3B3B

Violet238 130 238#EE82EE
Brown3205 51 51#CD3333

Plum221 160 221#DDA0DD
Brown4139 35 35#8B2323

Orchid218 112 214#DA70D6
Salmon1255 140 105#FF8C69

MediumOrchid186 85 211#BA55D3
Salmon2238 130 98#EE8262

DarkOrchid153 50 204#9932CC
Salmon3205 112 84#CD7054

DarkViolet148 0 211#9400D3
Salmon4139 76 57#8B4C39

BlueViolet138 43 226#8A2BE2
LightSalmon1255 160 122#FFA07A

Purple160 32 240#A020F0
LightSalmon2238 149 114#EE9572

MediumPurple147 112 219#9370DB
LightSalmon3205 129 98#CD8162

Thistle216 191 216#D8BFD8
LightSalmon4139 87 66#8B5742

Snow1255 250 250#FFFAFA
Orange1255 165 0#FFA500

Snow2238 233 233#EEE9E9
Orange2238 154 0#EE9A00

Snow3205 201 201#CDC9C9
Orange3205 133 0#CD8500

Snow4139 137 137#8B8989
Orange4139 90 0#8B5A00

Seashell1255 245 238#FFF5EE
DarkOrange1255 127 0#FF7F00

Seashell2238 229 222#EEE5DE
DarkOrange2238 118 0#EE7600

Seashell3205 197 191#CDC5BF
DarkOrange3205 102 0#CD6600

Seashell4139 134 130#8B8682
DarkOrange4139 69 0#8B4500

AntiqueWhite1255 239 219#FFEFDB
Coral1255 114 86#FF7256

AntiqueWhite2238 223 204#EEDFCC
Coral2238 106 80#EE6A50

AntiqueWhite3205 192 176#CDC0B0
Coral3205 91 69#CD5B45

AntiqueWhite4139 131 120#8B8378
Coral4139 62 47#8B3E2F

Bisque1255 228 196#FFE4C4
Tomato1255 99 71#FF6347

Bisque2238 213 183#EED5B7
Tomato2238 92 66#EE5C42

Bisque3205 183 158#CDB79E
Tomato3205 79 57#CD4F39

Bisque4139 125 107#8B7D6B
Tomato4139 54 38#8B3626

PeachPuff1255 218 185#FFDAB9
OrangeRed1255 69 0#FF4500

PeachPuff2238 203 173#EECBAD
OrangeRed2238 64 0#EE4000

PeachPuff3205 175 149#CDAF95
OrangeRed3205 55 0#CD3700

PeachPuff4139 119 101#8B7765
OrangeRed4139 37 0#8B2500

NavajoWhite1255 222 173#FFDEAD
Red1255 0 0#FF0000

NavajoWhite2238 207 161#EECFA1
Red2238 0 0#EE0000

NavajoWhite3205 179 139#CDB38B
Red3205 0 0#CD0000

NavajoWhite4139 121 94#8B795E
Red4139 0 0#8B0000

LemonChiffon1255 250 205#FFFACD
DeepPink1255 20 147#FF1493

LemonChiffon2238 233 191#EEE9BF
DeepPink2238 18 137#EE1289

LemonChiffon3205 201 165#CDC9A5
DeepPink3205 16 118#CD1076

LemonChiffon4139 137 112#8B8970
DeepPink4139 10 80#8B0A50

Cornsilk1255 248 220#FFF8DC
HotPink1255 110 180#FF6EB4

Cornsilk2238 232 205#EEE8CD
HotPink2238 106 167#EE6AA7

Cornsilk3205 200 177#CDC8B1
HotPink3205 96 144#CD6090

Cornsilk4139 136 120#8B8878
HotPink4139 58 98#8B3A62

Ivory1255 255 240#FFFFF0
Pink1255 181 197#FFB5C5

Ivory2238 238 224#EEEEE0
Pink2238 169 184#EEA9B8

Ivory3205 205 193#CDCDC1
Pink3205 145 158#CD919E

Ivory4139 139 131#8B8B83
Pink4139 99 108#8B636C

Honeydew1240 255 240#F0FFF0
LightPink1255 174 185#FFAEB9

Honeydew2224 238 224#E0EEE0
LightPink2238 162 173#EEA2AD

Honeydew3193 205 193#C1CDC1
LightPink3205 140 149#CD8C95

Honeydew4131 139 131#838B83
LightPink4139 95 101#8B5F65

LavenderBlush1255 240 245#FFF0F5
PaleVioletRed1255 130 171#FF82AB

LavenderBlush2238 224 229#EEE0E5
PaleVioletRed2238 121 159#EE799F

LavenderBlush3205 193 197#CDC1C5
PaleVioletRed3205 104 137#CD6889

LavenderBlush4139 131 134#8B8386
PaleVioletRed4139 71 93#8B475D

MistyRose1255 228 225#FFE4E1
Maroon1255 52 179#FF34B3

MistyRose2238 213 210#EED5D2
Maroon2238 48 167#EE30A7

MistyRose3205 183 181#CDB7B5
Maroon3205 41 144#CD2990

MistyRose4139 125 123#8B7D7B
Maroon4139 28 98#8B1C62

Azure1240 255 255#F0FFFF
VioletRed1255 62 150#FF3E96

Azure2224 238 238#E0EEEE
VioletRed2238 58 140#EE3A8C

Azure3193 205 205#C1CDCD
VioletRed3205 50 120#CD3278

Azure4131 139 139#838B8B
VioletRed4139 34 82#8B2252

SlateBlue1131 111 255#836FFF
Magenta1255 0 255#FF00FF

SlateBlue2122 103 238#7A67EE
Magenta2238 0 238#EE00EE

SlateBlue3105 89 205#6959CD
Magenta3205 0 205#CD00CD

SlateBlue471 60 139#473C8B
Magenta4139 0 139#8B008B

RoyalBlue172 118 255#4876FF
Orchid1255 131 250#FF83FA

RoyalBlue267 110 238#436EEE
Orchid2238 122 233#EE7AE9

RoyalBlue358 95 205#3A5FCD
Orchid3205 105 201#CD69C9

RoyalBlue439 64 139#27408B
Orchid4139 71 137#8B4789

Blue10 0 255#0000FF
Plum1255 187 255#FFBBFF

Blue20 0 238#0000EE
Plum2238 174 238#EEAEEE

Blue30 0 205#0000CD
Plum3205 150 205#CD96CD

Blue40 0 139#00008B
Plum4139 102 139#8B668B

DodgerBlue130 144 255#1E90FF
MediumOrchid1224 102 255#E066FF

DodgerBlue228 134 238#1C86EE
MediumOrchid2209 95 238#D15FEE

DodgerBlue324 116 205#1874CD
MediumOrchid3180 82 205#B452CD

DodgerBlue416 78 139#104E8B
MediumOrchid4122 55 139#7A378B

SteelBlue199 184 255#63B8FF
DarkOrchid1191 62 255#BF3EFF

SteelBlue292 172 238#5CACEE
DarkOrchid2178 58 238#B23AEE

SteelBlue379 148 205#4F94CD
DarkOrchid3154 50 205#9A32CD

SteelBlue454 100 139#36648B
DarkOrchid4104 34 139#68228B

DeepSkyBlue10 191 255#00BFFF
Purple1155 48 255#9B30FF

DeepSkyBlue20 178 238#00B2EE
Purple2145 44 238#912CEE

DeepSkyBlue30 154 205#009ACD
Purple3125 38 205#7D26CD

DeepSkyBlue40 104 139#00688B
Purple485 26 139#551A8B

SkyBlue1135 206 255#87CEFF
MediumPurple1171 130 255#AB82FF

SkyBlue2126 192 238#7EC0EE
MediumPurple2159 121 238#9F79EE

SkyBlue3108 166 205#6CA6CD
MediumPurple3137 104 205#8968CD

SkyBlue474 112 139#4A708B
MediumPurple493 71 139#5D478B

LightSkyBlue1176 226 255#B0E2FF
Thistle1255 225 255#FFE1FF

LightSkyBlue2164 211 238#A4D3EE
Thistle2238 210 238#EED2EE

LightSkyBlue3141 182 205#8DB6CD
Thistle3205 181 205#CDB5CD

LightSkyBlue496 123 139#607B8B
Thistle4139 123 139#8B7B8B

SlateGray1198 226 255#C6E2FF
grey1128 28 28#1C1C1C

SlateGray2185 211 238#B9D3EE
grey2154 54 54#363636

SlateGray3159 182 205#9FB6CD
grey3179 79 79#4F4F4F

SlateGray4108 123 139#6C7B8B
grey41105 105 105#696969

LightSteelBlue1202 225 255#CAE1FF
grey51130 130 130#828282

LightSteelBlue2188 210 238#BCD2EE
grey61156 156 156#9C9C9C

LightSteelBlue3162 181 205#A2B5CD
grey71181 181 181#B5B5B5

LightSteelBlue4110 123 139#6E7B8B
gray81207 207 207#CFCFCF

LightBlue1191 239 255#BFEFFF
gray91232 232 232#E8E8E8

LightBlue2178 223 238#B2DFEE
DarkGrey169 169 169#A9A9A9

LightBlue3154 192 205#9AC0CD
DarkBlue0 0 139#00008B

LightBlue4104 131 139#68838B
DarkCyan0 139 139#008B8B

LightCyan1224 255 255#E0FFFF
DarkMagenta139 0 139#8B008B

LightCyan2209 238 238#D1EEEE
DarkRed139 0 0#8B0000

LightCyan3180 205 205#B4CDCD




LightCyan4122 139 139#7A8B8B
LightGreen144 238 144#90EE90





https://blog.sciencenet.cn/blog-3487790-1330043.html

上一篇:[转载]LaTeX——常用的数学符号
下一篇:浅谈关于迷茫,关于焦虑。
收藏 IP: 120.236.163.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-23 11:33

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部