GRABC(1) General Commands Manual GRABC(1)NAME
grabc - identifies an onscreen colour using a crosshair cursor.
SYNOPSIS
grabc
DESCRIPTION
grabc is s simple but very useful program to determine the color string in hex (or in RGB components) by clicking on a pixel on the screen.
While web browsing, lots of time you find a nice color and wonder what color is that. Well just use grabc!
When this program is run, the mouse pointer is grabbed and changed to a cross hair and when the mouse is clicked, the color of the clicked
pixel is written to stdout in hex prefixed with #. It will the R, G, B component also in the stderr.
AUTHOR
grabc was written by Muhammad A Muquit <muquit@muquit.com>
This manual page was written by Sonia Hamilton <sonia@snowfrog.net>, for the Debian project (but may be used by others).
April 29, 2005 GRABC(1)
Check Out this Related Man Page
XStoreNamedColor() XStoreNamedColor()
Name
XStoreNamedColor - set RGB values of a read/write colorcell by color name.
Synopsis
XStoreNamedColor(display, colormap, color, pixel, flags)
Display *display;
Colormap colormap;
char *color;
unsigned long pixel;
int flags;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
colormap
Specifies the colormap.
color Specifies the color name string (for example, "red"). This cannot be in hex format (as used in XParseColor()). Uppercase or low-
ercase is not important. The string should be in ISO LATIN-1 encoding, which means that the first 128 character codes are ASCII,
and the second 128 character codes are for special characters needed in western languages other than English.
pixel Specifies the entry in the colormap to store color in.
flags Specifies which red, green, and blue indexes are set.
Description
XStoreNamedColor() looks up the named color in the database, with respect to the screen associated with colormap, then stores the result in
the read/write colorcell of colormap specified by pixel. If the color name is not in the Host Portable Character Encoding, the result is
implementation-dependent. Uppercase or lowercase in name does not matter. The flags argument, a bitwise OR of the constants DoRed,
DoGreen, and DoBlue, determines which subfields within the pixel value in the cell are written.
For more information, see Volume One, Chapter 7, Color.
Errors
BadAccess pixel is unallocated or read-only.
BadColor Invalid colormap.
BadName color is not in server's color database.
BadValue pixel is not a valid index into colormap.
See Also
XDefaultColormap(), XDisplayCells(), XCopyColormapAndFree(), XCreateColormap(), XFreeColormap(), XGetStandardColormap(), XInstallCol-
ormap(), XListInstalledColormaps(), XSetStandardColormap(), XSetWindowColormap(), XUninstallColormap().
Xlib - Window Manager Hints XStoreNamedColor()