Note that rea and green is yellow light. Blue and green is cyan and blue and
red is magenta.
NB. Blend 8 Colors of GRB Light
load 'viewmat'
GRB=:|.255*1 0 2{"1 #:i.8
NAMES=:<>;:'WHITE YELLOW CYAN GREEN MAGENTA RED BLUE BLACK'
GRB;NAMES
------------T-------┐
│255 255 255│WHITE │
│255 255 0│YELLOW │
│ 0 255 255│CYAN │
│ 0 255 0│GREEN │
│255 0 255│MAGENTA│
│255 0 0│RED │
│ 0 0 255│BLUE │
│ 0 0 0│BLACK │
L-----------+--------
A=:8 8$7
B=:8 8$i.8
C=:|:B
D=:(>:/~i.8)*i.8 8
PAL=:255<.GRB,64 3$,+"1/~GRB
E=:0,(A,.B),C,.8+D
PAL viewmat E
It should work in jqt, JHS and Android
Linda
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm