Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XQColor(XS) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought


     X Version 11 (1 September 1988)              XQueryColor(XS)



     NAME
          XQueryColor, XQueryColors, XLookupColor - obtain color
          values


     SYNTAX
          XQueryColor(display, colormap, def_in_out)
                Display *display;
                Colormap colormap;
                XColor *def_in_out;

          XQueryColors(display, colormap, defs_in_out, ncolors)
                Display *display;
                Colormap colormap;
                XColor defs_in_out[];
                int ncolors;

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


     ARGUMENTS
          colormap  Specifies the colormap.

          color_name
                    Specifies the color name string (for example, red)
                    whose color definition structure you want
                    returned.

          def_in_out
                    Specifies and returns the RGB values for the pixel
                    specified in the structure.

          defs_in_out
                    Specifies and returns an array of color definition
                    structures for the pixel specified in the
                    structure.

          display   Specifies the connection to the X server.

          exact_def_return
                    Returns the exact RGB values.

          ncolors   Specifies the number of XColor structures in the
                    color definition array.

          screen_def_return
                    Returns the closest RGB values provided by the
                    hardware.


     DESCRIPTION
          The XQueryColor function returns the RGB values for each
          pixel in the XColor structures and sets the DoRed, DoGreen,
          and DoBlue flags.  The XQueryColors function returns the RGB
          values for each pixel in the XColor structures and sets the
          DoRed, DoGreen, and DoBlue flags.

          XQueryColor and XQueryColors can generate BadColor and
          BadValue errors.

          The XLookupColor function looks up the string name of a
          color with respect to the screen associated with the
          specified colormap.  It returns both the exact color values
          and the closest values provided by the screen with respect
          to the visual type of the specified colormap.  You should
          use the ISO Latin-1 encoding; uppercase and lowercase do not
          matter.  XLookupColor returns nonzero if the name existed in
          the color database or zero if it did not exist.


     DIAGNOSTICS
          BadColor  A value for a Colormap argument does not name a
                    defined Colormap.

          BadValue  Some numeric value falls outside the range of
                    values accepted by the request.  Unless a specific
                    range is specified for an argument, the full range
                    defined by the argument's type is accepted.  Any
                    argument defined as a set of alternatives can
                    generate this error.


     SEE ALSO
          XAllocColor(XS), XCreateColormap(XS), XStoreColors(XS)
          Xlib - C Language X Interface


     (printed 2/12/90) (1 September 1988)         XQueryColor(XS)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026