Rainbow image

Post Reply
User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Rainbow image

Post 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 1876 times

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Rainbow image

Post 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
The only thing that gets me down is gravity...

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Rainbow image

Post 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 1807 times

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Rainbow image

Post by rbytes »

Looks good!
The only thing that gets me down is gravity...

Post Reply