In addition to 256-xterm ansi colors, handle 24-bit colors. E.g., of the form ESC[ … 38;2;<r>;<g>;<b>. Slight tweak in regex.