How do I create a link with different coloured words?

Hi. I’m using Harlow 3.1.0. Is it possible to create a link where each word is a different colour?

Currently I’m using something like this to set the link to all one colour:

<!-- [[Orange link]] -->
(color: orange)[(link: "This is an orange link")[(goto: "Orange link")]]

And I think I had to add this to the CSS too:

tw-expression[name="color"] + tw-hook tw-link {
	color: inherit;

What I was hoping for was to be able to do something like this:

<!-- [[Orange and pink link]] -->
(link: (color: orange)["This is an orange "](color: pink)[and pink link"])[(goto: "Orange and pink link")]

I know that the syntax is completely wrong there, but hopefully you understand what I’m trying to do.

1 Like

This should help:

That’s only for changing the colour of the entire link.

If you want to change individual words, then this seems to do the trick:

(link: "I am (color: orange)[orange] and (color: red)[red]")[Colourful]

Awesome. Thanks for that.