| cmap2rgb, cmap2rgba, rgb2cmap \- colors and color maps |
| int rgb2cmap(int red, int green, int blue) |
| These routines convert between `true color' red/green/blue triples and the Plan 9 color map. |
| for a description of RGBV, the standard color map. |
| takes a trio of color values, scaled from 0 (no intensity) to 255 (full intensity), |
| and returns the index of the color in RGBV closest to that represented |
| decomposes the color of RGBV index |
| and returns a 24-bit integer with the low 8 bits representing the blue value, |
| the next 8 representing green, and the next 8 representing red. |
| decomposes the color of RGBV index |
| and returns a 32-bit integer with the low 8 bits representing an alpha value, |
| and the next 8 representing blue, then green, then red, as for |
| This 32-bit representation is the format used by |
| take colors as arguments. |
| .B /usr/local/plan9/src/libdraw |