Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xcmsformatofprefix(3) [hpux man page]

XcmsFormatOfPrefix()													      XcmsFormatOfPrefix()

Name
  XcmsFormatOfPrefix - obtain the format ID of the color space associated with a specified color string prefix.

Synopsis
  XcmsColorFormat XcmsFormatOfPrefix(prefix)
	   char *prefix;

Arguments
  prefix    Specifies the string containing the color space prefix.

Returns
  The color space format ID.

Availability
  Release 5 and later.

Description
  XcmsFormatOfPrefix()	returns the format ID for the specified color space prefix.  For example, XcmsCIEXYZFormat is returned for the prefix
  "CIEXYZ".  Note that the prefix is case-insensitive.	If the color space is not accessible in the color management system, XcmsFormatOfPre-
  fix() returns XcmsUndefinedFormat.

Structures
  The XcmsColor structure and XcmsColorFormat type are shown on the XcmsColor reference page.

See Also
  XcmsPrefixOfFormat().

Xlib - Device-independent Color 											      XcmsFormatOfPrefix()

Check Out this Related Man Page

XcmsAllocNamedColor()													     XcmsAllocNamedColor()

Name
  XcmsAllocNamedColor - allocate a color specified as a string.

Synopsis
  Status XcmsAllocNamedColor(display, colormap, color_string,
  color_screen_return, color_exact_return,result_format)
	Display *display;
	Colormap colormap;
	char *color_string;
	XcmsColor *color_screen_return;
	XcmsColor *color_exact_return;
	XcmsColorFormat result_format;

Arguments
  display   Specifies the connection to the X server.

  colormap  Specifies the colormap.

  color_string
	    Specifies the color string whose color definition structure is to be returned.

  color_screen_return
	    Returns the pixel value of the color cell and color specification that actually is stored for that cell.

  color_exact_return
	    Returns  the color specification parsed from the color string or parsed from the corresponding string found in a color name data-
	    base.

  result_format
	    Specifies the desired color format for the returned color specification.

Returns
  Zero on failure, non-zero on success.

Description
  The XcmsAllocNamedColor() function is similar to XAllocNamedColor() except the color specification returned can be specified to be  in  any
  format  supported by the color management system.  This function ultimately calls XAllocColor() to allocate a read-only color cell with the
  color specified by a color string.  The color string is parsed into an XcmsColor structure, converted to an RGB value, then finally  passed
  to XAllocColor().

  The  color string may contain a color name that appears in the client-side or X server's color database; or a numerical color specification
  for any color management supported color spaces such that the string conforms to the uniform syntax:

	 <color_space>:<color_space_specific_encoding>

  For example:

     RGB:red/green/blue
     RGBi:R/G/B
     CIEXYZ:X/Y/Z
     CIEuvY:u/v/Y
     CIExyY:x/y/Y
     CIELab:L/a/b
     CIELuv:L/u/v
     TekHVC:H/V/C

  For the RGB color space, the red, green, and blue parameters are hexidecimal strings of one to four digits.  For each of  the  other	color
  spaces,  each  parameter  is a floating-point number in standard string format.  In each case, each number specifies a value for one of the
  parameters of the color space.  Old-style RGB color strings beginning with a "#" remain supported  for  backwards  compatibility.   If  the
  color name is not in the Host Portable Character Encoding the result is implementation-dependent.  Color names are case-insensitive.

  This	function  returns both the color specification as a result of parsing (exact specification) and the actual color specification stored
  (screen specification).  This screen specification is the result of converting the RGB value returned  by  XAllocColor()  into  the  format
  specified  by  result_format.   If  there  is  no  interest  in  a returned color specification, unnecessary computation can be bypassed if
  result_format is set to XcmsRGBFormat.

Errors
  BadColor  The colormap argument does not name a defined Colormap.

Structures
  The XcmsColor and XcmsColorFormat structures are shown on the XcmsColor reference page.

See Also
  XcmsAllocColor(), XcmsLookupColor(), XcmsQueryColor(), XcmsQueryColors(), XcmsStoreColor(), XcmsStoreColors(), XcmsStoreNamedColor, XAlloc-
  Color(), XAllocNamedColor(), XLookupColor(), XParseColor(), XQueryColor(), XQueryColors(), XStoreColor(), XStoreColors().

Xlib - Device-independent Color 											     XcmsAllocNamedColor()
Man Page