Two Colours In One HTML Text String
Hi all,
I have a quick question regarding two different font colours in one line of text. Currently the script is:
draw textline center=1 color=black font_bold=no font_family=mono font_italic=no font_size=32 html=yes show_if=always text="[hint_word] - [code_word]" x=-128 y=0 z_index=0
This displays
[hint_word] - [code_word] on the screen. (The actual words are read in from an excel file).
However I need the hint_word to be black and the code_word to be a different colour. I have tried doing what many have suggested in various stack exchange posts for HTML, but I am having trouble translating that into OS.
Cheers,
Liam
Comments
Hi Liam,
The easiest way to do this is by using a
spantag around the words that you want to color, and then assign a special style to them. Like so:This is regular HTML, but as of OpenSesame 3.2 this will work also in
sketchpaditems.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
Thank you very much! Working like a charm!