24-bit Ansi

So there’s been some interest lately in the Tundra format to be able to draw 24-bit ansis.  There are some drawbacks though, as pointed out by @byteproject here, not to mention that it is limited to 80 characters wide and 5000 rows. Edit: It was pointed out these are not limitations of the format per se, but more of TundraDraw itself.  However, one would reasonably expect any .tnd file to load in TundraDraw.

There is, however, an alternative that PabloDraw and sites like sixteencolors.net already support. What format you ask?  Can’t be xbin due to its 16 color limitation.. The answer, of course, is the standard ansi format! The ANSI spec already allows for custom ansi codes that shouldn’t break any (correctly implemented) ansi parser that terminates an escape sequence on any character between 64 to 126 (@ to ~), and ignores any sequence it doesn’t recognize.

After some debate with @deuce of SyncTerm fame and others on SciNet , the following ansi escape sequence was decided:


Where you’d use 0 for background colour, and 1 for foreground colour. Each R, G, B component can range from 0 to 255.

The 24-bit colour sequence should always follow the 16-colour sequence, so that if the client doesn’t support 24 bit, it will fall back to using 16 colour.  PabloDraw chooses the closest colour to match out of the 16.

Combine this with the new SAUCE 0.5 spec, which saves not only the width and height of the canvas, but also iCE colours and legacy/DOS aspect mode flags, your artwork should remain fully intact when viewed by others!

In the future, I hope to add character customization, so it will be a full and true replacement for xbin.

So, dust off your PabloDraw 3.2+ and get drawing 24 bit!