Console application

How to :

  1. Print a character in a certain color
  2. Put the cursor in the upper-left-corner
  3. Clear the screen

For 1, you could probably leverage Colorize - Crystal 1.13.1. 2 and 3 would want to look into ANSI escape code - Wikipedia.

1 Like

The Crystal term project may be helpful.

2 Likes

You could use my S-Lang bindings for this: https://chiselapp.com/user/MistressRemilia/repository/remislang/

I did some of this a while ago, hoping to abstract out the low level ansi commands into something more high level. The project is out of date certainly, but it’s available as a reference if you’re interested in perusing.

I was able to build fzf-like utilities with it (which don’t take over the screen but do fancy rendering inline) and some full screen utilities with it too.