Lines Matching refs:color
26 This functions defines an metric on the RGB color space. The distance
29 \param red1 Red component of the first color.
30 \param green1 Green component of the first color.
31 \param blue1 Blue component of the first color.
32 \param red2 Red component of the second color.
33 \param green2 Green component of the second color.
34 \param blue2 Blue component of the second color.
56 FindClosestColor(const rgb_color &color, const rgb_color *palette)
62 unsigned distance = color_distance(color.red, color.green, color.blue,
74 InvertColor(const rgb_color &color)
77 // results in the same color.
78 if (color.red == 255 && color.green == 255
79 && color.blue == 255)
80 return color;
83 inverted.red = 255 - color.red;
84 inverted.green = 255 - color.green;
85 inverted.blue = 255 - color.blue;
98 for (int32 color = 0; color < 32768; color++) {
101 rgbColor.red = (color & 0x7c00) >> 7;
102 rgbColor.green = (color & 0x3e0) >> 2;
103 rgbColor.blue = (color & 0x1f) << 3;
105 map->index_map[color] = FindClosestColor(rgbColor, palette);