💾 Archived View for gemini.ctrl-c.club › ~nttp › toys › turtle › doc › colors.gmi captured on 2022-01-08 at 14:38:58. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
Tipsy Turtle uses 24-bit colors. The words `setpencolor` and `setbackground` require RPG triplets as arguments, like this:
255 0 0 setpc /* to draw with bright red lines */
There is also a palette of 16 colors that can be accessed by index as follows:
4 palette setpc /* has the same effect as above */
By default, the palette contains the same colors as in UCB Logo, namely: black, blue, green, cyan, red, magenta, yellow, white, brown, tan, forest (green), aqua(marine), salmon, purple, orange and grey. All of them can be changed with `setpalette`:
51 51 51 0 setpalette /* make black softer */ 255 204 0 13 setpalette /* make orange lighter */
Last but not least, you can access the initial 16 colors by name by prefixing it with a hash sign, like so:
#orange setbackground
The named colors can't be changed or added to, and `pencolor` or `background` always return RPG triplets, even if they were set from the palette or a named color.