", Hyphenation = on, Consecutive Hyphens = 2, Vert. Just. = off> ", Level 1 Show = no, Level 2 Suffix = , Level 2 Starting Value = 0, Level 2 Show = no> ", Level 1 Show = no, Level 2 Suffix = "<#04>"> ", Level 1 Show = no, Level 2 Suffix = > ", Level 1 Show = no, Level 2 Suffix = "<#04>"> Colors ) (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066 667,6))> Colors ) (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066 667,6))> <|,"9<#1e>99"> COLORS ) (E10,0,0,0,1,0,0.053333,1,15,0,0,1,0,0,0,0,1,0,1,0.066667,0.066667,6,6,0,0.066 667,6))> ) (T8,2,12,0.026667,0.733333,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,10 2,1101,3, <"table"> ) (T8,3,12,0.066667,0.6,0,1,0.333333,0,516,0,17,0,0,0,0,0,0,1,1,2048,512,102,110 1,3, ) (g9,5,0 (p7,5,8,19 (g9,5,0 (g9,5,0 (v4,5,0,0.266667,0,1.6,0,17,1,0) (v4,6,0,1.6,0,1.6,0.933333,17,1,0) (v4,7,0,1.6,0.933333,0.266667,0.933333,17,1,0) (v4,8,0,0.266667,0.933333,0.266667,0,17,1,0)))) (g9,10,8 (g9,10,1032 (p7,10,8,13 (g9,10,0 (g9,10,0 (v4,10,0,1.268771,0.615801,1.021755,0.615801,17,1,0) (v4,11,0,1.021755,0.615801,0.887018,0.503208,17,1,0) (v4,12,0,0.887018,0.503208,0.887018,0.259257,17,1,0) (v4,13,0,0.887018,0.259257,1.021755,0.146666,17,1,0) (v4,14,0,1.021755,0.146666,1.33614,0.146666,17,1,0) (v4,15,32,1.33614,0.146666,1.268771,0.296785,17,0,0) (v4,16,0,1.268771,0.296785,1.089124,0.296785,17,1,0) (v4,17,0,1.089124,0.296785,1.089124,0.465677,17,1,0) (v4,18,0,1.089124,0.465677,1.268771,0.465677,17,1,0) (v4,19,32,1.268771,0.465677,1.268771,0.615801,17,0,0)))) (p7,21,8,13 (g9,21,0 (g9,21,0 (v4,21,0,1.33614,0.934816,1.021755,0.934816,17,1,0) (v4,22,0,1.021755,0.934816,0.887018,0.822221,17,1,0) (v4,23,0,0.887018,0.822221,0.887018,0.709628,17,1,0) (v4,24,0,0.887018,0.709628,1.089124,0.709628,17,1,0) (v4,25,0,1.089124,0.709628,1.089124,0.784692,17,1,0) (v4,26,0,1.089124,0.784692,1.268771,0.784692,17,1,0) (v4,27,0,1.268771,0.784692,1.268771,0.615801,17,1,0) (v4,28,32,1.268771,0.615801,1.268771,0.465677,17,0,0) (v4,29,0,1.268771,0.465677,1.268771,0.296785,17,1,0) (v4,30,32,1.268771,0.296785,1.33614,0.146666,17,0,0) (v4,31,0,1.33614,0.146666,1.470876,0.259257,17,1,0) (v4,32,0,1.470876,0.259257,1.470876,0.822221,17,1,0) (v4,33,0,1.470876,0.822221,1.33614,0.934816,17,1,0))))) (g9,34,2048 (v4,34,33,0.819649,0.146666,0.819649,0.146666,17,0,0) (v4,35,33,0.819649,1.16,0.819649,1.16,17,0,0) (v4,36,33,1.538245,1.16,1.538245,1.16,17,0,0) (v4,37,33,1.538245,0.146666,1.538245,0.146666,17,0,0)))) (E10,0,0,0,1,1,0.053333,1,15,0,0,1,0,0,0,0,1,1,1,0.066667,0.066667,6,6,0,0.066 667,6))> Colormaps 9.1<#04>In X, a color is defined by a set of three numeric values,representing and Colorsintensities of red, green, and blue. Red, green, and blue are referred to as the primary hues. A colormap is a list of colors, each indexed by an integer p ixel value. Each entry in a colormap is called a color cell. Raster graphics displays store pixel values in a special screen hardware memory. As the screen hardwarescans this memory, it reads each pixel value, looks up the color in the corresponding cell of a colormap, and displays the color on its screen. The colormap abstraction applies to all classes of visual types supported byX, including those for screens which are actually monochrome. For example, :gray<#1e>scale screens use colormaps in which colors actually specify the monochrome intensity. A typical black<#1e>and<#1e>w hite monochrome display has a:static<#1e>gray screen with a two<#1e>cell colormap. The following list describes how pixel values and colormaps are handled for each visual class. w:direct<#1e>color <#1f> 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. w:gray<#1e>scale <#1f> A pixel value indexes a single colormap that contains monochrome intensities. Colormap entries can be changed. w:pseudo<#1e>color <#1f> A pixel value indexes a single colormap that contains color intensities. Colormap entries can be changed. w:static<#1e>color <#1f> Same as :pseudo<#1e>color , except that the colormap entries are predefined by the hardware and cannot be changed. w:static<#1e>gray <#1f> Same as :gray<#1e>scale, except that the colormap entries are predefined by the hardware and cannot be changed. w:true<#1e>color <#1f> Same as :direct<#1e>color, 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. CLX provides functions to create colormaps, access and modify colors and color cells, and install colormaps in screen hardware. Color Functions9.2<#04>A color is represented by a CLX color object, in which each of the red,green, and blue values is specified by an rgb<#1e>val <#1f> a floating pointnumbe r between 0.0 and 1.0. (see paragraph 1.6, Data Types). The value 0.0represents the minimum intensity, while 1.0 represents the maximumintensity. CLX automatically converts rgb<#1e>val values into 16<#1e>bit integerswhen sending colors to an X server. The X server, in turn, scales 16<#1e>bit color values to match the actual intensity range supported by the screen. <|,"9<#1e>100">Colors used on :gray<#1e>scale screens must have the same value for each of red,green, and blue. Only one of these values is used by screen hardware todetermine intensity; however, CLX does not define which of red, green, orblue is actually used. The following paragraphs describe the CLX functions used to create, access, and modify colors. make<#1e>color &key (:blue 1.0) (:green 1.0) (:red 1.0) &allow<#1e>other<#1e>keysFunctioncolor", Sort String = "make<#1e>color"> Returns:
color <#1f> Type color. Creates, initializes, and returns a new color object with the specified values for red, green, and blue. :blue, :green, :red <#1f> rgb<#1e>val values that specify the saturation for each primary. color<#1e>blue colorFunctionblue", Sort String = "color<#1e>blue"> Returns:
blue<#1e>intensity <#1f> Type rgb<#1e>val. Returns and (with setf) sets the value for blue in the color . color <#1f> A color object. color<#1e>green colorFunctiongreen", Sort String = "color<#1e>green"> Returns:
green<#1e>intensity <#1f> Type rgb<#1e>val. Returns and (with setf) sets the value for green in the color . color <#1f> A color object. color<#1e>p colorFunctionp", Sort String = "color<#1e>p"> Returns:
color<#1e>p <#1f> Type boolean. Returns non<#1e>nil if the argument is a color object and nil otherwise. color<#1e>red colorFunctionred", Sort String = "color<#1e>red"> Returns:
red<#1e>intensity <#1f> Type rgb<#1e>val. Returns and (with setf) sets the value for red in the color . color <#1f> A color object. color<#1e>rgb colorFunctionrgb", Sort String = "color<#1e>rgb"> Returns:
red, green, blue <#1f> Type rgb<#1e>val. Returns the values for red, green, and blue in the color. color <#1f> A color object. <|,"9<#1e>101"> Colormap 9.3<#04>A colormap is represented in CLX by a colormap object. A CLX Functionsprogram can create and manipulate several colormap objects. However, thecolors contained in a colormap are made visible only when the colormap isinstalled. Each window is associated with a colormap that is used to translate window pixels into colors (see window<#1e>colormap). However, awindow will appear in its true colors only if its associated colormap is installed. The total number of colormaps that can be installed depends on the screenhardware. Most hardware devices allow exactly one colormap to be installed at any time. That is, screen<#1e>min<#1e>installed<#1e> maps and screen<#1e>max<#1e>installed<#1e>maps are both equal to 1. Installing a new colormap can cause a previously installed colormap to be uninstalled. It is important to remember that the set of installed colormaps is a hardwareresource shared cooperatively among all client programs connected to an X server. A CLX program can control the contents of colormaps by allocating colorcells in one of two ways: read<#1e>only or read<#1e>write. Allocating a read<#1e>only color cell establishes a color value for a specified pixel value that cannot be changed. However, read<#1e>only color cells can be shared among all client programs. Read<#1e>only allocation is the best strategy for making use oflimited colormap hardware in a multi<#1e>client environment. Alternatively, allocating a read<#1e>write color cell allows a client theexclusive right to set the color value stored in the cell. A cell allocatedread<#1e>write by one client cannot be allocated by another client, not even as a read<#1e>only cell. Note that read<#1e>write allocation is not allowed for screens whose visual type belongs to one of the :static<#1e>gray, :static<#1e>color , or:true<#1e>color classes. For screens of these classes, colormap cells cannot bemodified. Two entries of the default colormap, typically containing the colors black and white, are automatically allocated read<#1e>only. The pixel values for these entries can be returned by the functions screen<#1e>black <#1e>pixel and screen<#1e>white<#1e>pixel. Applications that need only two colors and also need to operate on both monochrome and color screens should always use these pixel values. The names black and white are intended to reflect relative intensity levels and need not reflect the actual colors displayed for these pixel values. Each screen has a default colormap, which is initially installed. By conventions, clients should allocate only read<#1e>only cells from the default colormap. Creating9.3.1<#04>CLX provides functions for creating and freeing new colormap Colormapsobjects. create<#1e>colormap visual window &optional alloc<#1e>p Functioncolormap", Sort String = "create<#1e>colormap"> Returns:
colormap <#1f> Type colormap. Creates and returns a colormap of the specified visual type for the screencontaining the window. The visual type must be one of those supported by the screen. Initial color cell values are undefined for visual types belonging to the :gray<#1e>scale, :pseudo<#1e>color, and :direct<#1e>color classes. Color cell valuesfor visual types belonging to the :static<#1e>gray, :static<#1e>colo r, and:true<#1e>color classes have initial values defined by the visual type.However, X does not define the set of possible visual types or their initial color cell values. If alloc<#1e>p is true, all colormap cells are permanently allocatedread<#1e>write and cannot be freed by free<#1e>colors. It is an error for alloc<#1e>p to be true when the visual type belongs to the :static<#1e>gray, :static<#1e>color, or :true<#1e>color classes. <|,"9<#1e>102">visual <#1f> A visual type ID. window <#1f> A window. alloc<#1e>p <#1f> Specifies whether colormap cells are permanently allocatedread<#1e>write. copy<#1e>colormap<#1e>and<#1e>free colormapFunctioncolormap<#1e>and<#1e>free", Sort String = "copy<#1e>colormap<#1e>and<#1e>free"> Returns:
new<#1e>colormap <#1f> Type colormap. Creates and returns a new colormap by copying, then freeing, allocated cellsfrom the specified colormap. All color cells allocated read<#1e>only or read<#1e>write in the original colormaphave the same color values and the same allocation status in the new<#1e>colormap. The values of unallocated color cells in the new<#1e>colormap areundefined. After copying, all allocated color cells in the originalcolormap are freed, as if free<#1e>colors was called. The unallocated cells of the original colormap are not affected. If alloc<#1e>p was true when the original colormap was created, then all colorcells of the new<#1e>colormap are permanently allocated read<#1e>write, and all the color cells of the original colormap are freed. colormap <#1f> A colormap. free<#1e>colormap colormapFunctioncolormap", Sort String = "free<#1e>colormap"> Destroys the colormap and frees its server resource. If the colormap isinstalled, it is uninstalled. For any window associated with the colormap,the window is assigned a nil colormap, and a :colormap<#1e>notify event is generated. The colors displayed for a window with a nil colormap areundefined. However, this function has no effect if the colormap is a screen default colormap. colormap <#1f> A colormap. Installing9.3.2<#04>The following paragraphs describe the CLX functions to install and Colormapsuninstall colormaps and to return the set of installed colormaps. Initially, the default colormap for a screen is installed (but is not in the required list). install<#1e>colormap colormapFunctioncolormap", Sort String = "install<#1e>colormap"> Installs the colormap. All windows associated with this colormap immediately display with true colors. As a side<#1e>effect, additional colormaps might be implicitly uninstalled by the server. If the specified colormap is not already installed, a :colormap<#1e> notify event is generated on every window associated with this colorm ap. In addition, for every other colormap that is implicitly uninstalled, a :colormap<#1e>notify event is generated on every associated window. colormap <#1f> A colormap. installed<#1e>colormaps window &key (:result<#1e>type 'list)Functioncolormaps", Sort String = "installed<#1e>colormaps"> Returns:
colormap <#1f> Type sequence of colormap. Returns a sequence containing the installed colormaps for the screen of the specified window. The order of the colormaps is not significant. window <#1f> A window. <|,"9<#1e>103">:result<#1e>type <#1f> A sub<#1e>type of sequence that indicates the type of sequence to return. uninstall<#1e>colormap colormapFunctioncolormap", Sort String = "uninstall<#1e>colormap"> Uninstalls the colormap. However, the colormap is not actually uninstalledif this would reduce the set of installed colormaps below the value of screen<#1e>min<#1e>installed<#1e>maps . If the colormap is actually uninstalled, a:colormap<#1e> notify event is generated on every associated window. colormap <#1f> A colormap. Allocating Colors9.3.3<#04>The following paragraphs describe the functions for allocating read<#1e>only and read<#1e>write color cells, allocating color planes, and freeing color cells. alloc<#1e>color colormap colorFunctioncolor", Sort String = "alloc<#1e>color"> Returns:
pixel <#1f> Type pixel.
screen<#1e>color, exact<#1e>color <#1f> Type color . Returns a pixel for a read<#1e>only color cell in the colormap . The color in the allocated cell is the closest approximation to therequested color possible for the screen hardware. The othervalues returned give both the approximate color stored in the cell and the exact color requested. The requested color can be either a color object or a stringablecontaining a color name. If a color name is given, a correspondingcolor value is looked up (see lookup<#1e>colo r) and used. Color namestrings must contain only ISO Latin<#1e>1 characters; case is notsignificant. colormap <#1f> A colormap. color <#1f> A color object or a stringable containing a color name. alloc<#1e>color<#1e>cells colormap colors &key (:planes 0) :contiguous<#1e>p Functioncolor<#1e>cells", Sort String = "alloc<#1e>color<#1e>cells">
(:result<#1e>type 'list) Returns:
pixels, mask <#1f> Type sequence of pixels. Returns a sequence of pixels for read<#1e>write color cells in the colormap. The allocated cells contain undefined color values. The visual typeclass of the colormap must be either :gray<#1e>scale, :pseudo<#1e>color,or :direct<#1e>color. The colors argument and the :planes argument define the number of pixelsand the number of masks returned, respectively. The number of colorsmust be positive, and the number of planes must be non<#1e>negative. Atotal of (* colors (expt 2 planes)) color cells are allocated. The pixelvalues for the allocated cells can be computed by combining the returnedpixels and masks. The length of the returned masks sequence is equal to :planes. Each maskof the returned masks sequence defines a single bitplane. None of the masks have any 1 bits in common. Thus, by selectively combining maskswith logior, (expt 2 planes) distinct combined plane masks can be computed. The length of the returned pixels sequence is equal to colors . None of the pixels have any 1 bits in common with each other or with any of thereturned masks. By combining pixels and plane masks with logior, (*colors (expt 2 planes)) distinct pixel values can be produced. <|,"9<#1e>104">If the colormap class is :gray<#1e>scale or :pseudo<#1e>color, each maskwill have exactly one bit set. If the colormap class is :direct<#1e>color, each mask will have exactly three bits set. If :contiguous<#1e>p istrue, combining all masks with logior produces a plane maskwith either one set of contiguous bits (for :gray<#1e>scal e and:pseudo<#1e>color) or three sets of contiguous bits (for :direct<#1e>color). colormap <#1f> A colormap. colors <#1f> A positive number defining the length of the pixelssequen ce returned. :planes <#1f> A non<#1e>negative number defining the length of the maskssequence returned. :contiguous<#1e>p <#1f> If true, the masks form contiguous sets of bits. :result<#1e>type <#1f> A subtype of sequence that indicates the type ofsequences returned. alloc<#1e>color<#1e>planes colormap colors &key (:reds 0) (:greens 0) (:blues 0) Functioncolor<#1e>planes", Sort String = "alloc<#1e>color<#1e>planes">
:contiguous<#1e>p (:result<#1e>type 'list) Returns:
pixels <#1f> Type sequence of pixel.
red<#1e>mask, green<#1e>mask, blue<#1e>mask <#1f> Type pixel. Returns a sequence of pixels for read<#1e>write color cells in the colormap. The allocated cells contain undefined color values. The visual typeclass of the colormap must be either :gray<#1e>scale, :pseudo<#1e>color,or :direct<#1e>color. The colors argument defines the number of pixels returned. The :reds,:greens, and :blues arguments define the number of bits set in thereturned red, green, and blue masks, respectively. The number of colorsmust be positive, and the number of bits for each mask must benon<#1e>negative. A total of (* colors (expt 2 (+ reds greens blues)))c olor cells are allocated. The pixel values for the allocated cells canbe computed by combining the returned pixels and masks. Each mask of the returned masks defines a pixel subfield for the corresponding primary. None of the masks have any 1 bits in common. Byselectively combining subsets of the red, green, and blue masks withlogior, (expt 2 (+ reds greens blues) distinct combined plane masks canbe computed. The length of the returned pixels sequence is equal to colors. None ofthe pixels have any 1 bits in common with each other or with any of thereturned masks. By combining pixels and plane masks with logior, (*colors (expt 2 (+ reds greens blues)) distinct pixel values can beproduced. If :contiguous<#1e>p is true, each of returned masks consists of a setof contiguous bits. If the colormap class is :direct <#1e>color, eachreturned mask lies within the pixel subfield for its primary. colormap <#1f> A colormap. colors <#1f> A positive number defining the length of the pixelssequen ce returned. :planes <#1f> A non<#1e>negative number defining the length of the masks sequence returned. :contiguous<#1e>p <#1f> If true, then the masks form contiguous sets of bits. :result<#1e>type <#1f> A subtype of sequence that indicates the type of sequences returned. free<#1e>colors colormap pixels &optional (plane<#1e>mask 0)Functioncolors", Sort String = "free<#1e>colors"> Frees a set of allocated color cells from the colormap. The pixelvalues for the freed cells are computed by combining the given pixelssequence and :plane<#1e>mask. The total number of cells freed is: <|,"9<#1e>105">(* (length pixels) (expt 2 (logcount plane<#1e>mask))) The :plane<#1e>mask must not have any bits in common with any of the givenpixels. The pixel values for the freed cells are produced by usinglogior to combine each of the given pixels with all subsets of the:plane<#1e>mask. Note that freeing an individual pixel allocated by alloc<#1e>color<#1e>pla nesmay not allow it to be reused until all related pixels computed from thesame plane mask are also freed. A single error is generated if any computed pixel is invalid or if itscolor cell is not allocated by the client. Even if an error isgenerated, all valid pixel values are freed. colormap <#1f> A colormap. pixels <#1f> A sequence of pixel values. plane<#1e>mask <#1f> A pixel value with no bits in common with any of the pixels. Finding Colors9.3.4<#04>A CLX program can ask the X server to return the colors stored inallocated color cells. The server also maintains a dictionary of colornames and their associated color values. CLX provides a function to look up the values for common colors by names such as <#7f>red", <#7f>purple", and so forth. The following paragraphs describe the CLX functions for returning the colorvalues associated with color cells or with color names. lookup<#1e>color colormap nameFunctioncolor", Sort String = "lookup<#1e>color"> Returns:
screen<#1e>color, exact<#1e>color <#1f> Type color. Returns the color associated by the X server with the given color name . The name must contain only ISO Latin<#1e>1 characters; case is notsignificant. The first value returned is the closest approximation tothe requested color possible on the screen hardware. The second valuereturned is the true color value for the requested color. colormap <#1f> A colormap. name <#1f> A stringable color name. query<#1e>colors colormap pixels &key (:result<#1e>type 'list)Functioncolors", Sort String = "query<#1e>colors"> Returns:
colors <#1f> Type sequence of color. Returns a sequence of the colors contained in the allocated cells of thecolormap specified by the given pixels. The values returned forunallocated cells are undefined. colormap <#1f> A colormap. pixels <#1f> A sequence of pixel values. :result<#1e>type <#1f> A subtype of sequence that indicates the type of sequences returned. Changing Colors9.3.5<#04>The following paragraphs describe the CLX functions to change the colors in colormap cells. store<#1e>color colormap pixel color &key (:red<#1e>p t) (:green<#1e>p t) (:blue<#1e>p t )Functioncolor", Sort String = "store<#1e>color"> Changes the contents of the colormap cell indexed by the pixel . Components of the given color are stored in the cell. The :red<#1e>p, :green<#1e>p, and :blue<#1e>p arguments indicate which components of the givencolor are stored. <|,"9<#1e>106">The color can be either a color object or a stringable containing acolor name. If a color name is given, a corresponding color value islooked up (see lookup<#1e>colo r) and used. Color name strings must contain only ISO Latin<#1e>1 characters; case is not significant. colormap <#1f> A colormap. pixel <#1f> A pixel. color <#1f> A color object or a stringable containing a color name. :red<#1e>p, :green<#1e>p, :blue<#1e>p<#1f> boolean values indicating which color components to store. store<#1e>colors colormap pixel<#1e>colors &key (:red<#1e>p t) (:green<#1e>p t) (:blue<#1e>p t)Functioncolors", Sort String = "store<#1e>colors"> Changes the contents of multiple colormap cells. pixel<#1e>color s is a list of the form ({pixel color}*), indicating a set of pixel values and the colors to store in the corresponding cells. The :red<#1e>p, :green<#1e>p, and:blue<#1e> p arguments indicate which components of the given colors arestored. Each color can be either a color object or a stringable containing acolor name. If a color name is given, a corresponding color value islooked up (see lookup<#1e>color) and used. Color name strings must containonly ISO Latin<#1e>1 characters; case is not significant. colormap <#1f> A colormap. pixel<#1e>colors <#1f> A list of the form ({pixel color}*). :red<#1e>p, :green<#1e>p, :blue<#1e>p<#1f> boolean values indicating which color components to store. <|,"9<#1e>107"> Colormap9.3.6<#04>The complete set of colormap attributes is discussed in the following Attributesparagraphs. colormap<#1e>display colormapFunctiondisplay", Sort String = "colormap<#1e>display"> Returns:
display <#1f> Type display. Returns the display object associated with the specified colorma p. colormap <#1f> A colormap. colormap<#1e>equal colormap<#1e>1 colormap<#1e>2F unctionequal", Sort String = "colormap<#1e>equal"> Returns true if the two arguments refer to the same server resource and nil if they do not. colormap<#1e>1, colormap<#1e>2 <#1f> A colormap. colormap<#1e>id colormapFunctionid", Sort String = "colormap<#1e>id"> Returns:
id <#1f> Type resource<#1e>id. Returns the unique ID assigned to the specified colormap. colormap <#1f> A colormap. colormap<#1e>p colormapFunctionp", Sort String = "colormap<#1e>p"> Returns:
map<#1e>p <#1f> Type boolean. Returns non<#1e>nil if the argument is a colormap and nil otherwise. colormap<#1e>plist colormapFunctionplist", Sort String = "colormap<#1e>plist"> Returns:
colormap<#1e>p <#1f> Type boolean. Returns and (with setf) sets the property list for the specified colormap. This function provides a hook where extensions can add data. colormap <#1f> A colormap. <|,"9<#1e>108"> .