Source file colrspec.icn
############################################################################
#
#	File:     colrspec.icn
#
#	Subject:  Procedure to produce VRML color specifications
#
#	Author:   Ralph E. Griswold
#
#	Date:     May 3, 1997
#
############################################################################
#
#  This file is in the public domain.
#
############################################################################
#
#  Requires:  Version 9 graphics
#
############################################################################
#
#  Links:  wopen
#
############################################################################

link wopen

procedure colrspec(s)
   local color
   static max, win

   initial {
      max := real(2 ^ 16 - 1)
      WOpen("canvas=hidden")
      }

   color := ""

   ColorValue(s) ? {
      every 1 to 3 do {
         color ||:= (tab(upto(",") | 0) / max) || " "
         move(1)
         }
      return color
      }

   fail

end

This page produced by UniDoc on 2021/04/15 @ 23:59:44.