Lines Matching refs:color
28 This functions defines an metric on the RGB color space. The distance
31 \param red1 Red component of the first color.
32 \param green1 Green component of the first color.
33 \param blue1 Blue component of the first color.
34 \param red2 Red component of the second color.
35 \param green2 Green component of the second color.
36 \param blue2 Blue component of the second color.
58 FindClosestColor(const rgb_color &color, const rgb_color *palette)
64 unsigned distance = color_distance(color.red, color.green, color.blue,
76 InvertColor(const rgb_color &color)
79 // results in the same color.
80 if (color.red == 255 && color.green == 255
81 && color.blue == 255)
82 return color;
85 inverted.red = 255 - color.red;
86 inverted.green = 255 - color.green;
87 inverted.blue = 255 - color.blue;
100 for (int32 color = 0; color < 32768; color++) {
103 rgbColor.red = (color & 0x7c00) >> 7;
104 rgbColor.green = (color & 0x3e0) >> 2;
105 rgbColor.blue = (color & 0x1f) << 3;
107 map->index_map[color] = FindClosestColor(rgbColor, palette);