I want to write a line of letters one by one, each with a different font colour and background. WriteString
with stdout
lets me write all the letters in the same line, but it can only be used with plain text. Is there any way to do the same but with coloured text?
My best guess was to create a list with the coloured text and then join it with StringJoin
, but it does not work. Yes, I am quite new to Mathematica.
So, I want to start with something like {A,B,C}
and get ABC
, with each letter with different color and background. Any ideas?
lst = {Style["A", Red], Style["B", Blue], Style["C", Green]};
you can useRow[lst]
orStringJoin[ToString[#, StandardForm] & /@ lst]
? $\endgroup$