From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/color.html | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 man/man3/color.html (limited to 'man/man3/color.html') diff --git a/man/man3/color.html b/man/man3/color.html new file mode 100644 index 00000000..a8274707 --- /dev/null +++ b/man/man3/color.html @@ -0,0 +1,89 @@ + +color(3) - Plan 9 from User Space + + + + +
+
+
COLOR(3)COLOR(3) +
+
+

NAME
+ +
+ + cmap2rgb, cmap2rgba, rgb2cmap – colors and color maps
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h>
+ #include <draw.h> +
+
+ int    rgb2cmap(int red, int green, int blue) +
+
+ int    cmap2rgb(int col) +
+
+ int    cmap2rgba(int col)
+
+
+

DESCRIPTION
+ +
+ + These routines convert between ‘true color’ red/green/blue triples + and the Plan 9 color map. See color(7) for a description of RGBV, + the standard color map. +
+ + Rgb2cmap 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 by those values. +
+ + Cmap2rgb decomposes the color of RGBV index col 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. + Cmap2rgba decomposes the color of RGBV index col and returns a + 32-bit integer with the low 8 bits representing an alpha + value, defined to be 255, and the next 8 representing blue, then + green, then red, as for cmap2rgba shifted up 8 bits. This 32-bit + representation is the format used by draw(3) and memdraw(3) library + routines that take colors as arguments.
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/libdraw
+
+
+

SEE ALSO
+ +
+ + graphics(3), allocimage(3), draw(3), image(7), color(7)
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3