Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

inquire_color_table(3G)

inquire_size(3G)

shade_mode(3G)

shade_range(3G)

DEFINE_COLOR_TABLE(3G)

NAME

define_color_table − set the color values in the device color table. 

SYNOPSIS

C Syntax:

void define_color_table(fildes,start,count,colors);
int fildes,start,count;
float colors[][3];

FORTRAN77 Syntax:

subroutine define_color_table(fildes,start,count,colors)
integer*4 fildes,start,count
real colors(3,count)

Pascal Syntax:

type rgb_color=array[1..3]of real;

procedure define_color_table(fildes,start,count:integer;
var colors array:[lo..hi:integer]of rgb_color);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

start Integer index into the color table at which to start the color table update. 

count Integer number of color table entries to be updated. 

colors New red,green,blue values for each color table entry (floating-point values in the range of 0 to 1, where 1 is full intensity).  In C terminology-
 
   color_table[start][0]=colors[0][0];  /*red  */
   color_table[start][1]=colors[0][1];  /*green*/
   color_table[start][2]=colors[0][2];  /*blue */
   ...
   color_table[start+count-1][2] = colors[count-1][2]
 

Discussion

Each file descriptor opened as an output device has a color table.  When this procedure is called, the color table and the device’s color map are updated.  If multiple file descriptors are open to the same device, the color table and the device’s color map may not always be identical.  For Starbase procedures that have red, green and blue parameters, the color table (not the color map) is searched for the closest color. 
 
Some device drivers have a gescape (READ_COLOR_MAP) that reads the current color map into the color table.  See the appropriate device driver description for more information. 

For multibank graphics devices:

16 Planes Each bank of 8 has the same color map. 

24 Planes If the mode parameter of shade_mode is set to CMAP_FULL, when the color table is written, the blue entries are the intensities of bank 1, the green are bank 2, and red is in bank 3.  Otherwise the device appears to be a standard 8-plane graphics device. 

DEFAULTS

All color maps are device-dependent. 

SEE ALSO

inquire_color_table(3G), inquire_size(3G), shade_mode(3G), shade_range(3G), Starbase Device Drivers Library.

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026