黑色
深红色
绿色
橄榄色
藏青色
紫色
青色
灰色
银色
红色
浅绿色
黄色
蓝色
艳粉色
浅蓝色
白色

解决方案 »

  1.   

    Red Green Blue Color 
    0 0 0 Black 
    0 0 255 Blue 
    0 255 0 Green 
    0 255 255 Cyan 
    255 0 0 Red 
    255 0 255 Magenta 
    255 255 0 Yellow 
    255 255 255 White 
    0 0 128 Dark blue 
    0 128 0 Dark green 
    0 128 128 Dark cyan 
    128 0 0 Dark red 
    128 0 128 Dark magenta 
    128 128 0 Dark yellow 
    128 128 128 Dark gray 
    192 192 192 Light gray 
      

  2.   

    色彩表,但是(r,g,b)是0~1之间的值,将它们都乘以255可得0~255之间的值
    #define BLACK 0, 0, 0
    #define WHITE 1, 1, 1
    #define RED 1, 0, 0
    #define GREEN 0, 1, 0
    #define BLUE 0, 0, 1
    #define YELLOW 1, 1, 0
    #define CYAN 0, 1, 1
    #define MAGENTA 1, 0, 1
    #define AQUAMARINE 0.439216, 0.858824, 0.576471
    #define BLUEVIOLET 0.62352, 0.372549, 0.623529
    #define BROWN 0.647059, 0.164706, 0.164706
    #define CADETBLUE 0.372549, 0.623529, 0.623529
    #define CORAL 1.0, 0.498039, 0.0
    #define CORNFLOWERBLUE 0.258824, 0.258824, 0.435294
    #define DARKGREEN 0.184314, 0.309804, 0.184314
    #define DARKOLIVEGREEN 0.309804, 0.309804, 0.184314
    #define DARKORCHID 0.6, 0.196078, 0.8
    #define DARKSLATEBLUE 0.419608, 0.137255, 0.556863
    #define DARKSLATEGRAY 0.184314, 0.309804, 0.309804
    #define DARKSLATEGRAY 0.184314, 0.309804, 0.309804
    #define DARKTURQUOISE 0.439216, 0.576471, 0.858824
    #define DIMGRAY 0.329412, 0.329412, 0.329412
    #define DIMGREY 0.329412, 0.329412, 0.329412
    #define FIREBRICK 0.556863, 0.137255, 0.137255
    #define FORESTGREEN 0.137255, 0.556863, 0.137255
    #define GOLD 0.8, 0.498039, 0.196078
    #define GOLDENROD 0.858824, 0.858824, 0.439216
    #define GRAY 0.752941, 0.752941, 0.752941
    #define GREENYELLOW 0.576471, 0.858824, 0.439216
    #define GREY 0.752941, 0.752941, 0.752941
    #define INDIANRED 0.309804, 0.184314, 0.184314
    #define KHAKI 0.623529, 0.623529, 0.372549
    #define LIGHTBLUE 0.74902, 0.847059, 0.847059
    #define LIGHTGRAY 0.658824, 0.658824, 0.658824
    #define LIGHTGREY 0.658824, 0.658824, 0.658824
    #define LIGHTSTEELBLUE 0.560784, 0.560784, 0.737255
    #define LIMEGREEN 0.196078, 0.8, 0.196078
    #define MAROON 0.556863, 0.137255, 0.419608
    #define MEDIUMAQUAMARINE          0.196078, 0.8, 0.6
    #define MEDIUMBLUE 0.196078, 0.196078, 0.8
    #define MEDIUMFORESTGREEN          0.419608, 0.556863, 0.137255
    #define MEDIUMGOLDENROD 0.917647, 0.917647, 0.678431
    #define MEDIUMORCHID 0.576471, 0.439216, 0.858824
    #define MEDIUMSEAGREEN 0.258824, 0.435294, 0.258824
    #define MEDIUMSLATEBLUE 0.498039, 0.0, 1.0
    #define MEDIUMSPRINGGREEN          0.498039, 1.0, 0.0
    #define MEDIUMTURQUOISE 0.439216, 0.858824, 0.858824
    #define MEDIUMVIOLETRED 0.858824, 0.439216, 0.576471
    #define MIDNIGHTBLUE 0.184314, 0.184314, 0.309804
    #define NAVY 0.137255, 0.137255, 0.556863
    #define NAVYBLUE 0.137255, 0.137255, 0.556863
    #define ORANGE 0.8, 0.196078, 0.196078
    #define ORANGERED 1.0, 0.0, 0.498039
    #define ORCHID 0.858824, 0.439216, 0.858824
    #define PALEGREEN 0.560784, 0.737255, 0.560784
    #define PINK 0.737255, 0.560784, 0.560784
    #define PLUM 0.917647, 0.678431, 0.917647
    #define SALMON 0.435294, 0.258824, 0.258824
    #define SEAGREEN 0.137255, 0.556863, 0.419608
    #define SIENNA 0.556863, 0.419608, 0.137255
    #define SKYBLUE 0.196078, 0.6, 0.8
    #define SLATEBLUE 0.0, 0.498039, 1.0
    #define SPRINGGREEN 0.0, 1.0, 0.498039
    #define STEELBLUE 0.137255, 0.419608, 0.556863
    #define TAN 0.858824, 0.576471, 0.439216
    #define THISTLE 0.847059, 0.74902, 0.847059
    #define TURQUOISE 0.678431, 0.917647, 0.917647
    #define VIOLET 0.309804, 0.184314, 0.309804
    #define VIOLETRED 0.8, 0.196078, 0.6
    #define WHEAT 0.847059, 0.847059, 0.74902
    #define YELLOWGREEN 0.6, 0.8, 0.196078