Colour pinstripe/Display: Difference between revisions

Added Quackery.
(Added Quackery.)
Line 1,776:
NEXT x
NEXT i</syntaxhighlight>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ $ "turtleduck.qky" loadfile ] now!
 
[ 1280 ] is width ( --> n )
[ 720 ] is height ( --> n )
 
[ 0 0 0 ] is black ( --> n n n )
[ 255 0 0 ] is red ( --> n n n )
[ 0 255 0 ] is green ( --> n n n )
[ 0 0 255 ] is blue ( --> n n n )
[ 255 0 255 ] is magenta ( --> n n n )
[ 0 255 255 ] is cyan ( --> n n n )
[ 255 255 0 ] is yellow ( --> n n n )
[ 255 255 255 ] is white ( --> n n n )
 
[ [] swap
' [ black red
green blue
magenta cyan
yellow white ]
witheach
[ over times
[ dip swap tuck
nested join
unrot ]
drop ]
drop ] is colours ( n --> [ )
 
[ behead
dup dip
[ nested join ] ] is nextcolour ( [ --> [ [ )
 
[ nextcolour colour
-1 4 turn
height n->v
4 n->v v/ 2dup walk
-v fly
1 4 turn
1 n->v fly ] is stripe ( [ --> [ )
 
[ turtle
width n->v 2 1 v/ fly
-1 4 turn
height n->v 2 1 v/ fly
-1 4 turn
4 times
[ i^ 1+ colours
width times stripe
drop
width n->v -v fly
-1 4 turn
height n->v
4 n->v v/ fly
1 4 turn ] ] is pinstripes ( --> )</syntaxhighlight>
 
{{out}}
[[File:Quackery colour pinstripe.png|thumb|center]]
 
=={{header|Racket}}==
1,462

edits