Page 1 of 1

Rainbow image

Posted: Thu Jun 08, 2017 4:12 pm
by Mr. Kibernetik

Code: Select all

mx=500; my=300
> x, 0..mx
  #.drawline(x,my,x,my)
  > y, 0..my
    #.drawcolor(#.hsv2rgb(x/mx*360,1,y/my):3)
    #.drawline(x,my-y)
  <
<
Снимок.JPG
Снимок.JPG (18.55 KiB) Viewed 1887 times

Re: Rainbow image

Posted: Sat Sep 02, 2017 4:01 am
by rbytes
This program could create a perfect palette selector for a drawing program. It should probably include a gradient to white in addition to black.

And it will need an equivalent command to GET PIXEL X,Y COLOR R,G,B,A

Re: Rainbow image

Posted: Sat Sep 02, 2017 12:45 pm
by Mr. Kibernetik
rbytes wrote:
Sat Sep 02, 2017 4:01 am
This program could create a perfect palette selector for a drawing program. It should probably include a gradient to white in addition to black.

And it will need an equivalent command to GET PIXEL X,Y COLOR R,G,B,A
Yes, get pixel also will be implemented.

Code: Select all

mx=500; my=500
#.aaoff()
> x, 0..mx
  > y, 0..my
    #.drawpoint(x,my-y,#.hsv2rgb(x/mx*360,2-y/my*2,y/my*2):3)
  <
<
Снимок.PNG
Снимок.PNG (359.18 KiB) Viewed 1818 times

Re: Rainbow image

Posted: Sat Sep 02, 2017 2:11 pm
by rbytes
Looks good!