terminal colours by m.ukai

open Printf
let rec f s i=(s.[i]=s.[i-1]||s.[i-1]='
'&s.[i]=' ')&()=printf"  "||s.[i]='
'&()=printf"\x1b[49m
"||()=printf"\x1b[4%dm  "(match s.[i]with 'x'->0|'r'->1|'b'->4|'g'->2|'c'->6|'w'->7|_->9);f s(i+1);;Scanf.scanf"%s@X"(fun s->f(" "^s^"
")1)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page