"Can the words in the label be displayed in different random colors?"

Hello Kodular Community,

I want to implement a feature in Kodular:

In a Label, I want the text to display in such a way that the words at positions 2, 4, 6, 8, 10… (every even word) should appear in random colors.

Example:
Word1 (default color), Word2 (random color), Word3 (default), Word4 (random color), and so on.

:backhand_index_pointing_right: My questions:

  1. Is it possible to style or color individual words inside a Label dynamically?

  2. If yes, how can I achieve this effect in Kodular blocks?

  3. Are there any existing extensions that support coloring specific words in a Label?

Any guidance or suggestions will be very helpful :folded_hands:


Aia
text_color.aia (6.1 KB)

Hi,

try this

1 Like

It seems that the result was not achieved.

How strange, did you copy everything exactly? :grin:

Yes, exactly as you instructed.

I’m sorry, unfortunately I just stepped out of the house and I can’t send you the aia project right now.
As soon as I get back I’ll send it to you because I’m 100% sure it works.

1 Like

Okay, I don’t mind waiting.

Turn lable html property on and add this text.

<font color="blue">Hello, Kodular!</font> This is some <font color="#00FF00">green</font> text.

Can be an example.

1 Like

It works in a simple label, but when it is a dynamic label, it will not work. You will have to put the logic in the block.

Are you talking to me?

Check if it still gives you problems.

text_color_dynamic.aia (7.5 KB)

1 Like

Great work, lots of love and good luck.:smiling_face_with_three_hearts::smiling_face_with_three_hearts:

Very good! I’m glad :partying_face:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.