Text TOP words with different colors

I found a couple of previous forum entries from '16 for how to render words with different colors within a single Text TOP. The current TD version’s Text TOP has a ‘Specifications DAT’ parameter, were the help says:

It can also render text strings from a Table DAT via the Specification DAT parameter, where column headings are the parameter names that are to ve overidden when rendering a line of text for reach row of the table.

Does this mean the Text TOP can now render a sentence where every word has a different color? I can’t get the Specifications DAT to specify anything other than text and x,y position.

If you see at the manual (and also a recent tutorial), you can only have three columns in specification DAT:
text, x position and y position. There is no color, size or font specification.
You can do that using a replicator Comp to parse a table with text and more parameters.

That’s too bad, I was hoping that you could enter more than just x, y, text.

I’ve seen a lot of people using the Web Render TOP for this nicely, you can supply a DAT directly to it, it doesn’t have to be fed from a webpage. Pretty easy to copy and paste from an html editor.

That’s pretty clever. I tried it out, it worked interestingly well. It seems like a lot of machinery to invoke for making multicolored text, but I’ll have to experiment some more to know how reliable it is. I can already think of another aspect of the application that could make use of this facility, so very cool, thanks.

Hi @antoinedurr,

you can take this quite far. Have a look at the attached tox which has a fairly verbose script showing how you can dynamically create the website as you need it. The same layout can be reused for changing text without having to reload the website.

The general idea of the contained script can be nicely modularized into an extension.

webrenderTOPJavaScript.tox (1.4 KB)

cheers
Markus

Thanks, I’ll check it out. There’s a text DAT that points to the script and says ‘execute this’. Dumb question, but how do I execute that DAT’s contents?

Hi @antoinedurr,

you can r-click onto the DAT and choose “Run Script” from the menu, or - with the DAT selected - “Ctrl + r” on your keyboard.

Cheers
Markus

1 Like