CSS3の147色

CSS3では147色が既定されています。これらの色はVBAでもRGB関数で利用できます。

なお、147色のうち7色は名前がgrayかgreyかの違いなだけのため、147色の名前はついてますが色の種類は140色になります。

定数の列は後述するVBAの自作定数の色定数の名前です。

色見本 定数 色名 WebColor Red Green Blue
COLOR_indianred indianred #cd5c5c 205 92 92
COLOR_lightcoral lightcoral #f08080 240 128 128
COLOR_salmon salmon #fa8072 250 128 114
COLOR_darksalmon darksalmon #e9967a 233 150 122
COLOR_lightsalmon lightsalmon #ffa07a 255 160 122
COLOR_crimson crimson #dc143c 220 20 60
COLOR_red red #ff0000 255 0 0
COLOR_firebrick firebrick #b22222 178 34 34
COLOR_darkred darkred #8b0000 139 0 0
COLOR_pink pink #ffc0cb 255 192 203
COLOR_lightpink lightpink #ffb6c1 255 182 193
COLOR_hotpink hotpink #ff69b4 255 105 180
COLOR_deeppink deeppink #ff1493 255 20 147
COLOR_mediumvioletred mediumvioletred #c71585 199 21 133
COLOR_palevioletred palevioletred #db7093 219 112 147
COLOR_coral coral #ff7f50 255 127 80
COLOR_tomato tomato #ff6347 255 99 71
COLOR_orangered orangered #ff4500 255 69 0
COLOR_darkorange darkorange #ff8c00 255 140 0
COLOR_orange orange #ffa500 255 165 0
COLOR_gold gold #ffd700 255 215 0
COLOR_yellow yellow #ffff00 255 255 0
COLOR_lightyellow lightyellow #ffffe0 255 255 224
COLOR_lemonchiffon lemonchiffon #fffacd 255 250 205
COLOR_lightgoldenrodyellow lightgoldenrodyellow #fafad2 250 250 210
COLOR_papayawhip papayawhip #ffefd5 255 239 213
COLOR_moccasin moccasin #ffe4b5 255 228 181
COLOR_peachpuff peachpuff #ffdab9 255 218 185
COLOR_palegoldenrod palegoldenrod #eee8aa 238 232 170
COLOR_khaki khaki #f0e68c 240 230 140
COLOR_darkkhaki darkkhaki #bdb76b 189 183 107
COLOR_lavender lavender #e6e6fa 230 230 250
COLOR_thistle thistle #d8bfd8 216 191 216
COLOR_plum plum #dda0dd 221 160 221
COLOR_violet violet #ee82ee 238 130 238
COLOR_orchid orchid #da70d6 218 112 214
COLOR_fuchsia fuchsia #ff00ff 255 0 255
COLOR_magenta magenta #ff00ff 255 0 255
COLOR_mediumorchid mediumorchid #ba55d3 186 85 211
COLOR_mediumpurple mediumpurple #9370db 147 112 219
COLOR_blueviolet blueviolet #8a2be2 138 43 226
COLOR_darkviolet darkviolet #9400d3 148 0 211
COLOR_darkorchid darkorchid #9932cc 153 50 204
COLOR_darkmagenta darkmagenta #8b008b 139 0 139
COLOR_purple purple #800080 128 0 128
COLOR_indigo indigo #4b0082 75 0 130
COLOR_slateblue slateblue #6a5acd 106 90 205
COLOR_darkslateblue darkslateblue #483d8b 72 61 139
COLOR_mediumslateblue mediumslateblue #7b68ee 123 104 238
COLOR_greenyellow greenyellow #adff2f 173 255 47
COLOR_chartreuse chartreuse #7fff00 127 255 0
COLOR_lawngreen lawngreen #7cfc00 124 252 0
COLOR_lime lime #00ff00 0 255 0
COLOR_limegreen limegreen #32cd32 50 205 50
COLOR_palegreen palegreen #98fb98 152 251 152
COLOR_lightgreen lightgreen #90ee90 144 238 144
COLOR_mediumspringgreen mediumspringgreen #00fa9a 0 250 154
COLOR_springgreen springgreen #00ff7f 0 255 127
COLOR_mediumseagreen mediumseagreen #3cb371 60 179 113
COLOR_seagreen seagreen #2e8b57 46 139 87
COLOR_forestgreen forestgreen #228b22 34 139 34
COLOR_green green #008000 0 128 0
COLOR_darkgreen darkgreen #006400 0 100 0
COLOR_yellowgreen yellowgreen #9acd32 154 205 50
COLOR_olivedrab olivedrab #6b8e23 107 142 35
COLOR_olive olive #808000 128 128 0
COLOR_darkolivegreen darkolivegreen #808000 85 107 47
COLOR_mediumaquamarine mediumaquamarine #66cdaa 102 205 170
COLOR_darkseagreen darkseagreen #8fbc8f 143 188 143
COLOR_lightseagreen lightseagreen #20b2aa 32 178 170
COLOR_darkcyan darkcyan #008b8b 0 139 139
COLOR_teal teal #008080 0 128 128
COLOR_aqua aqua #00ffff 0 255 255
COLOR_cyan cyan #00ffff 0 255 255
COLOR_lightcyan lightcyan #e0ffff 224 255 255
COLOR_paleturquoise paleturquoise #afeeee 175 238 238
COLOR_aquamarine aquamarine #7fffd4 127 255 212
COLOR_turquoise turquoise #40e0d0 64 224 208
COLOR_mediumturquoise mediumturquoise #48d1cc 72 209 204
COLOR_darkturquoise darkturquoise #00ced1 0 206 209
COLOR_cadetblue cadetblue #5f9ea0 95 158 160
COLOR_steelblue steelblue #4682b4 70 130 180
COLOR_lightsteelblue lightsteelblue #b0c4de 176 196 222
COLOR_powderblue powderblue #b0e0e6 176 224 230
COLOR_lightblue lightblue #add8e6 173 216 230
COLOR_skyblue skyblue #87ceeb 135 206 235
COLOR_lightskyblue lightskyblue #87cefa 135 206 250
COLOR_deepskyblue deepskyblue #00bfff 0 191 255
COLOR_dodgerblue dodgerblue #1e90ff 30 144 255
COLOR_cornflowerblue cornflowerblue #6495ed 100 149 237
COLOR_royalblue royalblue #4169e1 65 105 225
COLOR_blue blue #0000ff 0 0 255
COLOR_mediumblue mediumblue #0000cd 0 0 205
COLOR_darkblue darkblue #00008b 0 0 139
COLOR_navy navy #000080 0 0 128
COLOR_midnightblue midnightblue #191970 25 25 112
COLOR_cornsilk cornsilk #fff8dc 255 248 220
COLOR_blanchedalmond blanchedalmond #ffebcd 255 235 205
COLOR_bisque bisque #ffe4c4 255 228 196
COLOR_navajowhite navajowhite #ffdead 255 222 173
COLOR_wheat wheat #f5deb3 245 222 179
COLOR_burlywood burlywood #deb887 222 184 135
COLOR_tan tan #d2b48c 210 180 140
COLOR_rosybrown rosybrown #bc8f8f 188 143 143
COLOR_sandybrown sandybrown #f4a460 244 164 96
COLOR_goldenrod goldenrod #daa520 218 165 32
COLOR_darkgoldenrod darkgoldenrod #b8860b 184 134 11
COLOR_peruv peruv #cd853f 205 133 63
COLOR_chocolate chocolate #d2691e 210 105 30
COLOR_saddlebrown saddlebrown #8b4513 139 69 19
COLOR_sienna sienna #a0522d 160 82 45
COLOR_brown brown #a52a2a 165 42 42
COLOR_maroon maroon #800000 128 0 0
COLOR_white white #ffffff 255 255 255
COLOR_snow snow #fffafa 255 250 250
COLOR_honeydew honeydew #f0fff0 240 255 240
COLOR_mintcream mintcream #f5fffa 245 255 250
COLOR_azure azure #f0ffff 240 255 255
COLOR_aliceblue aliceblue #f0f8ff 240 248 255
COLOR_ghostwhite ghostwhite #f8f8ff 248 248 255
COLOR_whitesmoke whitesmoke #f5f5f5 245 245 245
COLOR_seashell seashell #fff5ee 255 245 238
COLOR_beige beige #f5f5dc 245 245 220
COLOR_oldlace oldlace #fdf5e6 253 245 230
COLOR_floralwhite floralwhite #fffaf0 255 250 240
COLOR_ivory ivory #fffff0 255 255 240
COLOR_antiquewhite antiquewhite #faebd7 250 235 215
COLOR_linen linen #faf0e6 250 240 230
COLOR_lavenderblush lavenderblush #fff0f5 255 240 245
COLOR_mistyrose mistyrose #ffe4e1 255 228 225
COLOR_gainsboro gainsboro #dcdcdc 220 220 220
COLOR_lightgray lightgray #d3d3d3 211 211 211
COLOR_lightgrey lightgrey #d3d3d3 211 211 211
COLOR_silver silver #c0c0c0 192 192 192
COLOR_darkgray darkgray #a9a9a9 169 169 169
COLOR_darkgrey darkgrey #a9a9a9 169 169 169
COLOR_gray gray #808080 128 128 128
COLOR_grey grey #808080 128 128 128
COLOR_dimgray dimgray #696969 105 105 105
COLOR_dimgrey dimgrey #696969 105 105 105
COLOR_lightslategray lightslategray #778899 119 136 153
COLOR_lightslategrey lightslategrey #778899 119 136 153
COLOR_slategray slategray #708090 112 128 144
COLOR_slategrey slategrey #708090 112 128 144
COLOR_darkslategray darkslategray #2f4f4f 47 79 79
COLOR_darkslategrey darkslategrey #2f4f4f 47 79 79
COLOR_black black #000000 0 0 0



CSS3の147色定数

上記の表の順に定数化しています。RGB関数で計算済みの値を設定していますので、Font.Colorプロパティなどに定数を設定するとそのまま色が設定されます。



サンプルコード

実際には定数をこんな書き方はしませんが、使い方としてはこんな感じです。

Constで指定した定数をそのままFont.Colorプロパティに設定すると文字色が変更されます。