>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  COLOR

COLOR

COLOR

Name


      COLOR

Purpose


      Set a color in the color table by specifying color name.

Category


Calling Sequence


      color, name, [index, r, g, b]

Inputs


      name = color name (like red, green, ...). in
        Name may be modified by the words dark, pale,
        very dark, very pale.
        (Only one very is handled). Default color=white.
      index = color table index for new color (def=last). in
      r, g, b = components of color table to modify. in,out
        If r,g,b sent then table is not loaded.

Keyword Parameters


Keywords


        FILE=f color file to use instead of the default.
          Text file, each line has r g b color_name.
        /LEARN prompts for r,g,b values of an unknown color.
        /LIST lists all available colors.
        MAXNUMBER=mx return number of colors known.
        NUMBER=n Select color by color number (0 to MAXNUMBER-1).
          Index # 255 is set by default. To set a different index
          a dummy color name must also be given. It is ignored.
          Ex: color,'dum',50,number=7 sets index 50 to color 7.
          If no args are given default color and index used.
        NAME = nam return name of selected color.
          Useful with NUMBER keyword.
        TEXT=txt returns 0 or 255, whichever best with color.
        RED=r. Return red value for specified color.
        GREEN=g. Return green value for specified color.
        BLUE=b. Return blue value for specified color.
        /EXIT exit without modifying screen color table.

Outputs


Common Blocks


      color_com

Notes


Modification History


      R. Sterner, 26 Dec 1989
      R. Sterner, 7 Jun, 1990 --- polished for vms.
      R. Sterner, 4 Feb, 1991 ---- made system independent.
      R. Sterner, 1997 Dec 30 --- Converted colors file to text file
      and dropped need for Env. Var.
      R. Sterner, 1998 Jan 14 --- Switched to !d.table_size instead
      of !d.n_colors.
      R. Sterner, 2010 Apr 30 --- Converted arrays from () to [].
  Copyright (C) 1989, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us