!! Безопасные цвета 0,51,102,153,204,255 !! stro=40 gr.open 255,51,51,51,0,1 gr.screen ws,hs gr.text.size hs/30 gr.text.align 2 gr.color 255,255,255,255,1 gr.text.draw ldr,ws/2,hs/2,"Загрузка…" gr.render array.load r[],0,51,102,153,204,255 array.load g[],0,51,102,153,204,255 array.load b[],0,51,102,153,204,255 dim rct[216] dim lt[216] dim tp[216] dim rt[216] dim bt[216] dim col[216] dim scol$[216] dim scolcl$[216] dim scol_form$[216] dim clbdtx[stro] dim clbdtxa[stro] dim copyed[216] dim txk[216] Array.length n, r[] !! for i=1 to 22 a=216/i print int$(i)+"x"+str$(a) next i !! GOSUB COLOR_ARRAY GOSUB FORM1 GOSUB KURSOR GOSUB FORM2 !! gr.text.size h/40 gr.text.align 2 gr.color 255,0,0,0,1 gr.color 255,255,255,255,1 gr.text.draw title,ws/2,h/40," Palitra_v2 " !! GOSUB TITLE gr.render DO %GOSUB EVENT_BUT GOSUB EVENT_BUTa UNTIL 0 !Start TITLE: gr.text.size h/40 gr.text.align 2 gr.color 255,255,255,255,1 gr.text.draw title,ws/2,h/40+3," Palitra_v2 " clipboard.put "" Clipboard.get clbd$ gr.text.size h/stro gr.text.align 3 gr.color 255,255,255,255,1 for i=1 to stro gr.color 30,0,0,0,1 gr.text.draw clbdtxa[i],(ws-25)+5,(h/stro*i+25)+10,clbd$ gr.color 255,255,255,255,1 gr.text.draw clbdtx[i],ws-25,h/stro*i+25,clbd$ next i RETURN !End !Start FORM1: t=0 w=ws-60 h=hs-60 for i=0 to 11 for j=0 to 17 t++ lt[t]=(ws/2-w/2)+w/12*i tp[t]=(hs/2-h/2)+h/18*j rt[t]=(ws/2-w/2)+w/12*i+w/12 bt[t]=(hs/2-h/2)+h/18*j+h/18 gr.rect rct[t],lt[t],tp[t],rt[t],bt[t] gr.modify rct[t],"paint",col[t] gr.color 255,0,0,0,0 gr.set.stroke 3 gr.rect rct[t],lt[t],tp[t],rt[t],bt[t] gr.text.size h/40 gr.color 255,255,255,255,1 gr.text.align 2 gr.text.draw txk[t],(lt[t]+rt[t])/2, (tp[t]+bt[t])/2,"к" gr.hide txk[t] next j next i RETURN !End !Start FORM2: gr.color 255,255,255,255,1 %gr.color 255,0,0,0,1 gr.rect rct_fon,25,25,ws-25,hs-25 gr.text.size hs/20 gr.text.align 2 gr.color 100,0,0,0,1 gr.text.draw txt_fon3,ws/2+2,hs/2+hs/20/2+5,"Белый" gr.text.size hs/20 gr.text.align 2 gr.color 255,255,255,255,1 gr.text.draw txt_fon,ws/2,hs/2+hs/20/2,"Белый" gr.text.size hs/20 gr.text.align 2 gr.color 255,0,0,0,0 gr.set.stroke 1 gr.text.draw txt_fon1,ws/2,hs/2+hs/20/2,"Белый" !Тень gr.color 50,0,0,0,1 gr.rect btf1,ws/3+5,hs-hs/10*2+10,ws/3*2+5,hs-hs/10+10 !Тень gr.text.size h/32 gr.text.align 2 gr.color 30,255,255,255,1 gr.text.draw btf2,(ws/3+ws/3*2)/2+5,((hs-hs/10*2)+(hs-hs/10))/2+h/30/2+10,"Скопировать" gr.color 170,255,255,255,0 gr.set.stroke 2 gr.rect btf3,ws/3,hs-hs/10,ws/3*2,hs-hs/10*2 gr.color 100,0,0,0,0 gr.rect btf4,ws/3-1,hs-hs/10*2-1,ws/3*2+1,hs-hs/10+1 gr.color 100,0,0,0,1 gr.rect btf5,ws/3+1,hs-hs/10*2+1,ws/3*2-1,hs-hs/10-1 bflt= ws/3 bftp= hs-hs/10*2 bfrt= ws/3*2 bfbt= hs-hs/10 gr.text.size h/32 gr.text.align 2 gr.color 100,255,255,255,1 gr.text.draw btf6,(ws/3+ws/3*2)/2,((hs-hs/10*2)+(hs-hs/10))/2+h/30/2,"Скопировать" gr.group grtx,txt_fon,txt_fon1 gr.group grfon,rct_fon,txt_fon,txt_fon1,txt_fon3,btf1,btf2, btf3,btf4,btf5,btf6 gr.group grbtf,btf3,btf4,btf5,btf6 gr.group grten,btf1,btf2 gr.hide grfon RETURN !End !Start COLOR_ARRAY: f=0 for i=1 to n for j=1 to n for t=1 to n f++ !! 1) ijt 2) itj 3) jit 4) jti 5) tij 6) tji !! gr.color 255,r[j],g[i],b[t],1 gr.paint.get col[f] r$= int$(r[j]) g$= int$(g[i]) b$= int$(b[t]) if len(r$)=1 then r$="00"+r$ elseif len(r$)=2 then r$="0"+r$ endif if len(g$)=1 then g$="00"+g$ elseif len(g$)=2 then g$="0"+g$ endif if len(b$)=1 then b$="00"+b$ elseif len(b$)=2 then b$="0"+b$ endif scol_form$[f]=r$+" "+g$+" "+b$ scol$[f]=int$(r[j])+" "+int$(g[i])+" "+int$(b[t]) scolcl$[f]= "255,"+int$(r[j])+","+int$(g[i])+","+int$(b[t])+",1" next t next j next i RETURN !End !Start EVENT_BUT: un=0 Gr.touch flag, x, y if flag=1 then fltch=flag xtch=x ytch=y for i=1 to 216 if xtch>lt[i] & xtchtp[i] & ytchlt[i] & xtchtp[i] & ytchbflt & xbftp & ybflt & xbftp & y