Color Space

Introduction

The <colorspace> option specifies whether the text for the Table of Contents is grayscale or RGB color:

  • Grayscale is the gray level specified.
  • RGB color is the Red, Green and Blue levels specified to create a color.

The table below describes the elements for the TOC <colorspace>.

Contents of the <colorspace> Element

Element Level Pro Required Content
<appendparam version=”1.0″> Top   Topmost element, contains entire parameter spec
  ⇔   <toc> 2 Pro   Table of contents information
      ⇔  <colorspace> 3 Pro   Specifies the color space for the TOC
                <devicegray> 4 Pro   Sets to grayscale
                     <color> 5 Pro Grayscale level (0–100)
–    –    –    –    –    –    OR    –    –    –    –    –    –
      ⇔  <colorspace> 3 Pro   Specifies the color space for the TOC
                <devicergb> 4 Pro   Sets to RGB color
                    <red> 5 Pro Red level (0–255)
                    <green> 5 Pro Green level (0–255)
                    <blue> 5 Pro Blue level (0–255)

XML Code Sample

The first example uses <devicegray>, setting <colorspace> to <devicegray> and <color> to 50, which will create medium gray text in the Table of Contents.

<appendparam version="1.0">
 <!-- . Indicates skipped sections -->
 <!-- . -->
 <!-- . -->
   <TOC>
   <!-- . -->
   <!-- . -->
   <!-- . -->
      <colorspace>
         <devicegray>      
            <color>
               50
            </color>
         </devicegray>
      </colorspace>
   <!-- . -->
   <!-- . -->
   <!-- . -->
   </TOC>
<!-- . -->
<!-- . -->
<!-- . -->
</appendparam>

The second example uses <devicergb>, setting <colorspace> to <devicergb> and using the values of <red> 51<green> 153, and <blue> 51, which will create medium green text in the Table of Contents.

<appendparam version="1.0">
 <!-- . Indicates skipped sections -->
 <!-- . -->
 <!-- . -->
   <TOC>
   <!-- . -->
   <!-- . -->
   <!-- . -->
      <colorspace>
         <devicergb>
            <red>
               51
            </red>
            <green>
               153
            </green>
            <blue>
               51
            </blue>
         </devicergb>
      </colorspace>
   <!-- . -->
   <!-- . -->
   <!-- . -->
   </TOC>
<!-- . -->
<!-- . -->
<!-- . -->
</appendparam>

Elements for <colorspace>

devicegray

Specifies the Table of Content entries to be grayscale.

color (required for <devicegray>)

Specifies the gray level of the TOC entries using values from 0 through 100. The <color> value is a percentage of white, such that:

• 0 is black
• 50 is medium gray
• 100 is white

devicergb

Specifies the Table of Content entries to be in RGB color.

red (required for <devicergb>)

Specifies the red level of the TOC entries using values from 0 through 255.

green (required for <devicergb>)

Specifies the green level of the TOC entries using values from 0 through 255.

blue (required for <devicergb>)

Specifies the blue level of the TOC entries using values from 0 through 255.

Usage notes for <red>, <green>, and <blue>

If the color space is <devicergb>, then <red><green>, and <blue> specify the levels of each color from 0–255, such that:

RED GREEN BLUE RESULT
0 0 0 Black
255 0 0 Red
0 255 0 Green
0 0 255 Blue
255 255 255 White
128 128 128 Gray

16 million colors are possible with this system. You can get help choosing RGB values from graphic design software or several internet sites (for example, www.visibone.com/colorlab).

Note that red=128, green=128, and blue=128 makes gray. You can duplicate any gray color in RGB with an appropriate choice of equal red, green, and blue values.

Examples

To specify dark gray TOC entries:

   <TOC>
   <!-- . -->
   <!-- . -->
   <!-- . -->
      <colorspace>
         <devicegray>
             <color>
                25
             </color>
         </devicegray>
      </colorspace>
   <!-- . -->
   <!-- . -->
   <!-- . -->
   </TOC>

 The following, used in the sample parameter file, paramsletter.xml, results in dark green:

   <TOC>
   <!-- . -->
   <!-- . -->
   <!-- . -->
      <colorspace>
         <devicergb>
            <red>
               0
            </red>
            <green>
               87
            </green>
            <blue>
               44
            </blue>
         </devicergb>
      </colorspace>
   <!-- . -->
   <!-- . -->
   <!-- . -->
   </TOC>