XLookupColor man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

XLookupColor()							XLookupColor()

Name
  XLookupColor	–  get database RGB values and closest hardware-supported
  RGB values from color name.

Synopsis
  Status  XLookupColor(display,	 colormap,  colorname,	exact_def_return,
  screen_def_return)
	Display *display;
	Colormap colormap;
	char *colorname;
	XColor *exact_def_return, *screen_def_return;

Arguments
  display     Specifies	 a  connection	to  an	X  server;  returned from
	      XOpenDisplay().

  colormap    Specifies the colormap.

  colorname   Specifies a color name string (for example "red").   Upper‐
	      case  or	lowercase  does not matter.  If the color name is
	      not in the Host Portable Character Encoding, the result  is
	      implementation-dependent.

  exact_def_return
	      Returns  the  exact RGB values for the specified color name
	      from the /usr/lib/X11/rgb database.

  screen_def_return
	      Returns the closest RGB values possible on the hardware.

Returns
  Zero on failure, non-zero on success.

Description
  XLookupColor() looks up RGB values for  a  color  given  the	colorname
  string.   It returns both the exact color values and the closest values
  possible on tthe screen specified by colormap.

  XLookupColor() returns non-zero if colorname exists in the RGB database
  or zero if it does not exist.

  To  determine	 the  exact RGB values, XLookupColor() uses a database on
  the X server.	 On UNIX, this database is /usr/lib/X11/rgb.  To read the
  colors   provided   by   the	database  on  a	 UNIX-based  system,  see
  /usr/lib/X11/rgb.txt.	 The location, name, and contents  of  this  file
  are server-dependent.

  For  more information see Volume One, Chapter 7, Color, and Appendix D,
  The Server-side Color Database, in this volume.

Errors
  BadName   Color name not in database.

  BadColor  Invalid colormap.

Structures
     typedef struct {
	 unsigned long pixel;
	 unsigned short red, green, blue;
	 char flags;	    /* DoRed, DoGreen, DoBlue */
	 char pad;
     } XColor;

See Also
  XBlackPixel(), XWhitePixel(), XAllocColor(),	XAllocColorCells(),  XAl‐
  locColorPlanes(),   XAllocNamedColor(),  XFreeColors(),  XParseColor(),
  XQueryColor(), XQueryColors(), XStoreColor(),	 XStoreColors(),  XStore‐
  NamedColor().

Xlib - Color Cells						XLookupColor()
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net