%colors.jam
%define some color names
% Maureen Stone October 14, 1982 12:47 pm

% .black, .white, .red, .green, .blue, .magenta, .cyan, .yellow, .gray all defined in TJaMColorImpl
(black){.black}.cvx .def
(white){.white}.cvx .def
(gray){.gray}.cvx .def
(red){.red}.cvx .def
(green){.green}.cvx .def
(blue){.blue}.cvx .def
(magenta){.magenta}.cvx .def
(cyan){.cyan}.cvx .def
(yellow){.yellow}.cvx .def

(dbr) {0.075 .6 0.2 } .cvx  .def
(br) {0.075 .5 .5 } .cvx  .def
(ta) {.075 .4 .8 } .cvx  .def
(drd) {0.0 1.0 0.4 } .cvx  .def
(lrd) {0 .6 1  } .cvx  .def
(or) {0.055 1.0 1.0 } .cvx  .def
(dyw) {.167 1 .7 } .cvx  .def
(lyw) {0.167 .7 1.0 } .cvx  .def
(dgn) {0.333 1.0 0.4 } .cvx  .def
(lgn) {0.333 0.5 1.0 } .cvx  .def
(dbl) {0.67 1.0 0.5 } .cvx  .def
(lbl) {0.67 0.4 1.0 } .cvx  .def
(pu) {0.776 1 .8 } .cvx  .def
(vi) {0.776 .5 .8 } .cvx  .def
(pi) {0.833 0.4 1.0 } .cvx  .def
(dgr) {0.0 0.0 0.3 } .cvx  .def
(lgr) {0.0 0.0 0.77 } .cvx  .def

(darkBrown) {dbr .hsvcolor} .cvx  .def
(brown) {br .hsvcolor} .cvx  .def
(tan) {ta .hsvcolor} .cvx  .def
(darkRed) {drd .hsvcolor} .cvx  .def
(lightRed) {lrd .hsvcolor} .cvx  .def
(orange) {or .hsvcolor} .cvx  .def
(darkYellow) {dyw .hsvcolor} .cvx  .def
(lightYellow) {lyw .hsvcolor} .cvx  .def
(darkGreen) {dgn .hsvcolor} .cvx  .def
(lightGreen) {lgn .hsvcolor} .cvx  .def
(darkBlue) {dbl .hsvcolor} .cvx  .def
(lightBlue) {lbl .hsvcolor} .cvx  .def
(purple) {pu .hsvcolor} .cvx  .def
(violet) {vi .hsvcolor} .cvx  .def
(pink) {pi .hsvcolor} .cvx  .def
(darkGray) {dgr .hsvcolor} .cvx  .def
(lightGray) {lgr .hsvcolor} .cvx  .def

(next) {2 .add .dup}.cvx .def
%call with the starting index on the stack.  Should be positive
(setmap){.dup
dbr .sethsvmap next br .sethsvmap next ta  .sethsvmap next
drd .sethsvmap  next lrd .sethsvmap next or  .sethsvmap next
dyw .sethsvmap  next lyw .sethsvmap next dgn  .sethsvmap next
lgn .sethsvmap  next dbl .sethsvmap next lbl  .sethsvmap next
pu .sethsvmap  next vi .sethsvmap next pi  .sethsvmap next
dgr .sethsvmap  next lgr .sethsvmap}.cvx .def