;btw go board: 234,213,153 (setq yellow (/ 1 6.0) green (/ 2 6.0) cyan (/ 3 6.0) blue (/ 4 6.0) magenta (/ 5 6.0) red 1.0 ) ;note that 1530.0=255.0 * 6.0 (defun rgbstr (tt) (cond ((and (>= tt 0.0)(<= tt yellow));moving from red to yellow (strcat "255,";full red (itoa (fix (+ 0.5 (* tt 1530.0)))) ",";green increases to full "0";no blue ) ) ((<= tt green);moving from yellow to green (strcat (itoa (fix (+ 0.5 (* (- green tt) 1530.0)))) ",";red decreases "255,";full green "0";no blue ) ) ((<= tt cyan);moving from green to cyan (strcat "0,";no red "255,";full green (itoa (fix (+ 0.5 (* (- tt green) 1530.0))));blue increases ) ) ((<= tt blue);moving from cyan to blue (strcat "0,";no red (itoa (fix (+ 0.5 (* (- blue tt) 1530.0)))) ",";green decreases "255";full blue ) ) ((<= tt magenta);moving from blue to magenta (strcat (itoa (fix (+ 0.5 (* (- tt blue) 1530.0)))) ",";red increases "0,";no green "255";full blue ) ) ((<= tt red);moving from magenta to red (home) (strcat "255,";full red "0,";no green (itoa (fix (+ 0.5 (* (- red tt) 1530.0))));blue decreases ) ) (t "128,128,128");tt out of bounds - return neutral gray );end cond );end defun (defun test () (setq x 0.0) (while (< x 1.0) (terpri) (princ x)(princ ": ")(princ (rgbstr x)) (setq x (+ x 0.05)) ) ) (defun c:test () (setq x 0) (while (< x 100.0) (command "pline" (list x 0.0)(list x 100.0) "" "pedit" (entlast) "w" 1.0 "" "chprop" (entlast) "" "c" "t" (rgbstr (* 0.01 x)) "" ) (setq x (+ x 1.0)) ) )