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:

    For the profit of travel: in the first place, you get rid of a few prejudices.... The prejudiced against color finds several hundred millions of people of all shades of color, and all degrees of intellect, rank, and social worth, generals, judges, priests, and kings, and learns to give up his foolish prejudice.
    Herman Melville (1819–1891)

    Without any extraordinary effort of genius, I have discovered that nature was the same three thousand years ago as at present; that men were but men then as well as now; that modes and customs vary often, but that human nature is always the same. And I can no more suppose, that men were better, braver, or wiser, fifteen hundred or three thousand years ago, than I can suppose that the animals or vegetables were better than they are now.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)