X Window System Protocols and Architecture - Core Protocol - Color Modes

Color Modes

The way the X Window System handles colors can sometimes confuse users, and historically several different modes have been supported. Most modern applications use TrueColor (24-bit color, 8 bits for each of red, green and blue), but old or specialist applications may require a different color mode. Many commercial specialist applications use PseudoColor.

The X11 protocol actually uses a single 32-bit unsigned integer - called a pixelvalue - for representing a single color in most graphic operations. When transferring the intensity of primary colors, a 16 bit integer is used for each colour component. The following representations of colors exist; not all of them may be supported on a specific device.

  • DirectColor: A pixel value is decomposed into separate red, green, and blue subfields. Each subfield indexes a separate colormap. Entries in all colormaps can be changed.
    • TrueColor: Same as DirectColor, except that the colormap entries are predefined by the hardware and cannot be changed. Typically, each of the red, green, and blue colormaps provides a (near) linear ramp of intensity.
  • GrayScale: A pixel value indexes a single colormap that contains monochrome intensities. Colormap entries can be changed.
    • StaticGray: Same as GrayScale, except that the colormap entries are predefined by the hardware and cannot be changed.
  • PseudoColor (Chunky): A pixel value indexes a single colormap that contains color intensities. Colormap entries can be changed.
    • StaticColor: Same as PseudoColor, except that the colormap entries are predefined by the hardware and cannot be changed.
See also: X11 color names

Read more about this topic:  X Window System Protocols And Architecture, Core Protocol

Famous quotes containing the words color and/or modes:

    It is never the thing but the version of the thing:
    The fragrance of the woman not her self,
    Her self in her manner not the solid block,
    The day in its color not perpending time,
    Time in its weather, our most sovereign lord,
    The weather in words and words in sounds of sound.
    Wallace Stevens (1879–1955)

    Sight and all the other senses are only modes of touch.
    Samuel Butler (1835–1902)