When specifying colors for the FORECOLOR and BACKCOLOR attributes, the color names can also be used directly (instead of RGB values), if it is a known color in the operating environment of the client application. Some examples are shown in the table below.
Color names (RGB value) | |
Black (0, 0, 0) | Green (0, 128, 0) |
Silver (192, 192, 192) | Lime (0, 255, 0) |
Gray (128, 128, 128) | Olive (128, 128, 0) |
White (255, 255, 255) | Yellow (255, 255, 0) |
Maroon (128, 0, 0) | Navy (0, 0, 128) |
Red (255, 0, 0) | Blue (0, 0, 255) |
Purple (128, 0, 128) | Teal (0, 128, 128) |
Fuchsia (255, 0, 255) | Aqua (0, 255, 255) |