digital literacy for everyone


[lit]

[generate-title]

[lit] fig is a multi-purpose educational language-- originally designed to offer 16 colours in the term window or vt, with a compatible 16-colour palette in a graphics window. in 2017, i decided that rather than extend the language, a simple function (rgbcolour) would allow 24-bit colour without any change to the language itself. this is the original program example that uses this function. [img]https://ia801509.us.archive.org/29/items/fig_screencaps/rgb.fig.png[img] [fig] #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ function rgbcolor r g b python now = 0 ; figcgapal[0] = (r, g, b) fig fig # for alex: the first ever fig program with > 16 colors now display for y 1 256 1 for x 1 256 1 for my 0 1 1 for mx 0 1 1 r1 x minus 1 g1 y minus 1 b1 mx times 64 b2 my times 128 plus b1 xs mx times 256 plus x ys my times 256 plus y now rgbcolor r1 g1 b2 pset xs ys 0 next next next now display next now lineinput
fig main page: [url]https://codeinfig.neocities.org/fig/index.html[url] home: [lit]https://codeinfig.neocities.org[lit]