Module #04.03.02.02 : Colour facilities and appearance

All PVT documentation can be found under PHIGS Validation Tests - Overview. You may also return to the hierarchical table of topics covered by the PVT. For an explanation of the format of the individual module documentation, please see section 2.5 of the User's Guide.


DESCRIPTION: This module tests the colour facilities of the
workstation and the appearance of colored primitives.

SEMANTIC REQUIREMENTS:

*** *** ***   Support of colour by workstation   *** *** ***

***   Number of colors   ***


SR1. <Inquire colour facilities> returns the number of available colors for the specified workstation type.
#F 277
#D 6.17.2.2
#S
#T P01/3 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8

SR2. Every workstation type supports at least two colours.
#F 277
#D 6.17.2.2
#S 6.7/323/1
#T P01/3

SR3. The workstation can realize a continuous range of colours if the reported number of available colours is 0.
#F 69 236 277
#D 6.17.2.2
#S 6.7/323/1
#T P01/3 P04/4 P04/5 #C This doesn't necessarily mean that the workstation can realize
all the colours within a colour model, since its gamut may be a
subset of the full model. Within its gamut, however, all colours
are realizable.
***   Color available   ***


SR4. <Inquire colour facilities> returns the ability to display colours as COLOUR or MONOCHROME for the specified workstation type.
#F 277
#D 6.17.2.3
#S 4.5.12/64/3 6.7/323/1
#T P01/4 P06/1 P06/2

SR5. A workstation type has COLOUR for the value of its 'colour available' property if and only if it has displayable colours of various non-neutral hues.
#F 69 236 277
#D 6.17.2.3
#S 4.5.12/64/3
#T P01/5 P04/4 P06/1 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 #C Neutral hues are the gray-scale colours: white, gray, black.

SR6. A workstation type has MONOCHROME for the value of its 'colour available' property if and only if it has displayable colours of at most one non-neutral hue.
#F 69 236 277
#D 6.17.2.3
#S 4.5.12/64/3
#T P01/6 P04/5 P06/2 #C A monochrome workstation may be either gray-scale (no hues),
or may display only a single hue, such as different intensities
and saturation of green.
***   Primaries   ***


SR7. <Inquire colour facilities> returns each of the three primary colours as a CIELUV colour specification for a given workstation type.
#F 277
#D 6.17.2.1
#S 6.1/306/9 6.7/323/1
#T P01/1 P01/2
***   Predefined colours  ***


SR8. <Inquire colour facilities> returns the number of predefined colour indices for the specified workstation type.
#F 277
#D 6.17.2.4
#S
#T P02/1 P02/2

SR9. <Inquire predefined colour representation> returns the colour specification for a predefined colour index according to the default color model.
#F 278
#D 6.17.1.3 6.17.3.1
#S
#T P02/2 P02/3 P02/4 P02/6 P03/2

SR10. The n predefined colour indices in the Workstation Description Table (WDT) are indexed as 0 to n-1.
#F 277 278
#D 6.17.3
#S 4.5.12/63/5 6.7/323/1
#T P02/2 P03/2 #C The standard presumes this because in section 6.7 the predefined
colour indices in the WDT do not mention index as a data item, nor
is there a way to get a list of these indices (<inquire colour
facilities> gives the number of predefined indices, but not a list
thereof).

SR11. Predefined colour table indices 0 and 1 always exist.
#F 277 278
#D 6.17.3
#S 4.5.12/63/5 6.6/318/1
#T P02/1 P02/5 P02/6

SR12. The predefined colour indices number 0 and 1 have different colour specifications.
#F 278
#D 6.17.3.1
#S 4.5.2/42/3 4.5.12/63/5 6.7/323/1
#T P02/6

SR13. Immediately after <open workstation>, for each WDT predefined colour index there exists a Workstation State List (WSL) colour table entry with the same attributes, including the same colour index.
#F 3 235 236 278
#D 5.15.3 6.17.3
#S 4.5.2/42/3 6.6/318/1 6.7/323/1
#T P03/1 P03/2

SR14. Immediately after <open workstation>, the colour table contains nothing but the entries initialized from the WDT predefined colour table.
#F 3 235 236 278
#D 5.15.3 6.17.3
#S 4.5.2/42/3 6.6/318/1 6.7/323/1
#T P03/1

SR15. The colour coordinates of every predefined colour index are valid (with respect to the default colour model) and realizable for the workstation type.
#F 276 278
#D 6.17.1.3 6.17.2.1 6.17.2.2 6.17.3.1
#S 4.5.2/39/3 5.12.1/232/1
#T P02/3 P02/4 #C This implies that the colour coordinates are between 0 and 1
if the default color model is 1, 2, 3, or 4.
***   Color models   ***


SR16. <Inquire colour model facilities> returns the list of available colour models and the default colour model for the specified workstation type.
#F 276
#D 6.17.1.1 6.17.1.2 6.17.1.3
#S 4.5.12/64/1
#T P05/1 P05/2 P05/3 P05/4 P05/5 P05/12 P07/1 P07/2 P07/3 P07/4 P07/5
#T P07/6 P07/7 P07/8 P08/1 P08/2

SR17. All the colour models in the list of available colour models are valid and realizable for the specified workstation type.
#F 72 234 276
#D 5.15.1 6.17.1.2
#S 4.5.12/64/1
#T P05/5 P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P08/1 P08/2

SR18. The workstation type's default colour model returned by <inquire colour model facilities> is in the list of available colour models.
#F 276
#D 6.17.1.2 6.17.1.3
#S 4.5.12/64/1
#T P05/3

SR19. The list of available colour models contains the registered types 1 (RGB) and 2 (CIE).
#F 276
#D 6.17.1.2
#S 4.5.12/64/1 4.14/113/3 4.14/114/2
#T P05/4

SR20. Immediately after <open workstation>, the default colour model for the corresponding workstation type is in effect.
#F 3 234 276
#D 5.15.1 6.17.1.3
#S 4.5.12/63/6 6.6/317/1
#T P05/1 P05/12

SR21. The current colour model governs the interpretation of the colour coordinate parameters used in subsequent calls to <set colour representation> and <inquire colour representation>. Changing the colour model does not affect the colours associated with the colour table indices.
#F 69 72 236
#D 5.15.1 5.15.3.2
#S 4.5.12/63/8
#T P04/1 P04/2 P04/3 P05/6 P05/7 P05/8 P05/9 P05/10 P05/11 P06/1 P06/2
#T P07/1 P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 P08/1 P08/2 P09/1 #C Changing the colour model does not affect colours in the
colour table but only the "language" in which they are expressed.
E.g. The coordinates for red are (1,0,0) in RGB, and (0, 0.5, 1)
in HLS. A given index set to red under one color model continues
to indicate red if the model is changed.

SR22. Colour model 1 is predefined as RGB. The RGB color space is a unit cube (0-1 in all three dimensions) in which the primary axes represent red, green, and blue. Fully saturated renditions of these colors are associated with (1,0,0), (0,1,0), and (0,0,1), respectively. Other points are rendered by treating these primaries additively.
#F 276
#D 6.17.1.2
#S 4.5.12/64/1 6.1/306/8
#T P05/6 P05/7 P05/8 P05/9 P05/10 P05/11 P06/1 P06/2 P07/1 P07/2 P09/1 #C E.g. dark grayish green might be represented by (0.2, 0.7,
0.2).

SR23. Colour model 2 is predefined as CIELUV. In the CIELUV color space, hue is determined by the first two parameters u' and v', as defined in the 1976 CIE standard and the third parameter, Y, determines luminance value (0 for black, 1 for fully lighted).
#F 276
#D 6.17.1.2
#S 4.5.12/64/1 6.1/306/8
#T P05/6 P05/7 P07/7 P07/8

SR24. Colour model 3 is predefined as HSV. The first parameter, H, determines the hue, with values of 0 for red, 1/6 for yellow, 2/6 for green, 3/6 for cyan, 4/6 for blue, and 5/6 for magenta. The second parameter, S, determines color saturation, with 0 for unsaturated (gray scale) and 1 for fully saturated colors. The third parameter, V, determines the brightness, with 0 for black and 1 for fully bright colors.
#F 276
#D 6.17.1.2
#S 4.5.12/64/1 6.1/306/8
#T P05/8 P05/9 P07/3 P07/4 #C Note that V=1 for fully saturated and bright hues, and also
for white. Dark grayish green might be represented by (0.3333,
0.5, 0.5).

SR25. Colour model 4 is predefined as HLS. The first parameter, H, determines the hue, with values of 0 for red, 1/6 for yellow, 2/6 for green, 3/6 for cyan, 4/6 for blue, and 5/6 for magenta. The second parameter, L, determines the brightness, with 0 for black, 0.5 for fully bright colors, and 1 for white. The third parameter, S, determines color saturation, with 0 for unsaturated (gray scale) and 1 for fully saturated colors.
#F 276
#D 6.17.1.2
#S 4.5.12/64/1 6.1/306/8
#T P05/10 P05/11 P07/5 P07/6 #C E.g. dark grayish green might be represented by (0.3333, 0.3,
0.5).

SR26. The range of valid values for all parameters for all four predefined color models is 0 to 1.
#F 69 236
#D 5.15.3.2
#S 4.5.12/64/1 6.1/306/8
#T P01/1 P02/3 P04/1 P04/2 P04/3 P06/1 P06/2

SR27. Any colour coordinates within the range of the current colour model may be specified when invoking <set colour representation>.
#F 69
#D 5.15.1 5.15.3.2
#S 4.5.12/63/7 4.5.12/63/8
#T P04/1 P06/1 P06/2

SR28. When available on the workstation, colour models greater than 4 work as specified in the ISO register.
#F 276
#D 6.17.1.2
#S 4.5.12/64/1
#T P08/1

SR29. When available on the workstation, colour models less than one work as specified in the implementor documentation.
#F 276
#D 6.17.1.2
#S 4.1.1/15/1 4.5.12/64/1
#T P08/2
*** *** *** ***   Colour appearance   *** *** *** ***


SR30. The background colour (i.e. the colour of display immediately after clearing) is specified by entry number 0 in the colour table.
#F 69 236
#D 5.15.3.1 5.15.3.2
#S 4.5.12/63/5
#T P09/1 P10/1

SR31. Colour indices in the colour table greater than zero specify foreground colours.
#F 69 236
#D 5.15.3.1 5.15.3.2
#S 4.5.12/63/5
#T P10/1

SR32. <Inquire colour representation> returns the colour associated with an entry in the colour table as realized on the workstation, when type of returned values specified is REALIZED. The returned colour is described by a set of colour coordinates, to be interpreted according to the current colour model of the specified workstation.
#F 72 236
#D 5.15.3.1 5.15.3.2
#S 4.5.12/63/7 4.5.12/63/8 4.11/108/1
#T P01/2 P01/5 P01/6 P02/4 P04/2 P04/3 P04/4 P04/5 P07/1 P07/2 P07/3
#T P07/4 P07/5 P07/6 P07/7 P07/8 P08/1 P08/2 P09/1 P10/1

SR33. A defined colour specification is realized as the nearest available on the workstation.
#F 69 236
#D 5.15.3 6.17.2.1 6.17.2.2 6.17.2.3
#S 4.5.12/64/2
#T P01/2 P01/5 P01/6 P02/4 P04/2 P04/3 P04/4 P04/5 P06/1 P06/2 P07/1
#T P07/2 P07/3 P07/4 P07/5 P07/6 P07/7 P07/8 #C The background colour (number 0) of a workstation may not be
changeable, and hence the same requested colour coordinates may
be realized differently than when describing a foreground colour.

LOCAL DICTIONARY:

  Functions ---
  003: popwk   <open workstation>
  069: pscr    <set colour representation>
  072: pscmd   <set colour model>
  234: pqcmd   <inquire colour model>
  235: pqeci   <inquire list of colour indices>
  236: pqcr    <inquire colour representation>
  276: pqcmdf  <inquire colour model facilities>
  277: pqcf    <inquire colour facilities>
  278: pqpcr   <inquire predefined colour representation>
 
  Data Structures ---
  5  ...  workstation_state_list
  5.15  ...  colour_entry
  5.15.1  ...  current_colour_model
  5.15.3  ...  colour_table
  5.15.3.1  ...  colour_index
  5.15.3.2  ...  colour_specification
  6  ...  workstation_description_table
  6.17  ...  colour_entry
  6.17.1  ...  colour_model_facilities
  6.17.1.1  ...  number_of_available_colour_models
  6.17.1.2  ...  list_of_available_colour_models
  6.17.1.3  ...  default_colour_model
  6.17.2  ...  colour_facilities
  6.17.2.1  ...  primary_colours
  6.17.2.2  ...  number_of_available_colours
  6.17.2.3  ...  colour_available
  6.17.2.4  ...  number_of_predefined_colour_indices
  6.17.3  ...  predefined_colour_table
  6.17.3.1  ...  colour_specification
 



PROGRAM 1: Colour facilities

You may inspect either the design or code for this program.


PROGRAM 2: Validity of predefined colour table

You may inspect either the design or code for this program.


PROGRAM 3: WSL colour table initialized properly

You may inspect either the design or code for this program.


PROGRAM 4: Colour specification facilities

You may inspect either the design or code for this program.


PROGRAM 5: Colour model facilities

You may inspect either the design or code for this program.


PROGRAM 6: Colour or monochrome

You may inspect either the design or code for this program.


PROGRAM 7: Hue recognition for colour models

You may inspect either the design or code for this program.


PROGRAM 8: Non-explicitly defined color models

You may inspect either the design or code for this program.


PROGRAM 9: Background colour

You may inspect either the design or code for this program.


PROGRAM 10: Foreground colour

You may inspect either the design or code for this program.

End of documentation for 04.03.02.02