XAllocNamedColor 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]

XAllocNamedColor()					    XAllocNamedColor()

Name
  XAllocNamedColor – allocate a read-only colorcell from color name.

Synopsis
  Status       XAllocNamedColor(display,       colormap,      color_name,
  screen_def_return, exact_def_return)
	Display *display;
	Colormap colormap;
	char *color_name;
	XColor *screen_def_return;
	XColor *exact_def_return;

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

  colormap  Specifies  the ID of the colormap in which the colorcell will
	    be allocated.

  color_name
	    Specifies the color name  string  (for  example,  "red")  you
	    want.   Uppercase or lowercase does not matter.  If the color
	    name is not in the	Host  Portable	Character  Encoding,  the
	    result is implementation-dependent.

  screen_def_return
	    Returns  the  pixel value and RGB values actually used in the
	    colormap.  This is the closest color supported by  the  hard‐
	    ware.

  exact_def_return
	    Returns  the exact RGB values from the database corresponding
	    to the color_name supplied.

Returns
  Zero on failure, non-zero on success.

Description
  XAllocNamedColor()  determines  the  RGB  values  for	  the	specified
  color_name from the color database, and then allocates a read-only col‐
  orcell with the closest color available,  as	described  under  XAlloc‐
  Color().

  Like	XAllocColor,  XAllocNamedColor()  acts	differently on static and
  dynamic visuals.  On PseudoColor, DirectColor, and  GrayScale	 visuals,
  XAllocNamedColor()  fails if there are no unallocated colorcells and no
  allocated read-only colorcell exactly matches the  database  definition
  of  the  requested  color.   On  StaticColor, TrueColor, and StaticGray
  visuals, XAllocNamedColor() returns the  closest  RGB	 values	 (to  the
  database  definition of the requested color) available in the colormap.
  Both the database definition of the color, and the color actually allo‐
  cated are returned.

  XAllocNamedColor() returns a Status of zero if color_name was not found
  in the database or if the color could not be allocated.   The	 function
  returns non-zero when it succeeds.

  For more information, see Volume One, Chapter 7, Color.

Errors
  BadColor  colormap is invalid.

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(), XFreeColors(), XLookupColor(), XParseColor(), XQuery‐
  Color(),  XQueryColors(),  XStoreColor(),  XStoreColors(), XStoreNamed‐
  Color().

Xlib - Color Cells					    XAllocNamedColor()
[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