summaryrefslogtreecommitdiff
path: root/ipl/gpacks/weaving/colrcvrt.icn
blob: 54f4ce2bc6dfdbfeab7aae0f56d96f200aeada96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
############################################################################
#
#	File:     colrcvrt.icn
#
#	Subject:  Program to convert numerical color specifications
#
#	Author:   Ralph E. Griswold
#
#	Date:     February 10, 1999
#
############################################################################
#
#  This file is in the public domain.
#
############################################################################
#
#  AD HOC.  Should be procedure.
#
############################################################################
#
#  Requires:  
#
############################################################################

procedure main()

   range := 255

   while color := read() do {
      color ?:= {
         r := tab(upto(','))
         move(1)
         g := tab(upto(','))
         move(1)
         b := tab(0)
         }
       write((r * range), ",", (g * range), ",", (b * range))
       }

end