Color printing in Post window

It would be most convenient to print (postln) my text that goes to the post window in colors that I choose. Is this possible?

                       Thank You For Your Attention

To my knowledge, posting color is not under user control in the current SC-IDE (nor was it ever possible, even going back to the old Cocoa app). I’m pretty sure this is true of other editing environments (never heard of that feature in sc-el, never tried sc-vim).


Not the same thing, but Webviews can make nice “post” windows.

var wv = WebView().minSize_(300@200).front;
var text = "";
var post = { arg item; text = text + ("<p style='margin:0'>" + item + "</p>"); wv.setHtml(text) };
post.value("<span style='color:blue'>Blue</span> text");
post.value("<span style='color:orange'>Orange</span> text");
1 Like

! a red short way :

Ps. If you are in Emacs (or I guess Vi) or a terminal, then you can usually display ANSI color sequences, i.e.


in Python or such like.

I don’t know a nice way to make escaped Strings in Sc, though I’m sure there is one.