#Styling part of the string shown on chat console

2 messages · Page 1 of 1 (latest)

sacred topaz
#

Hello, I am figuring out how I could apply color on part of string shown on console. For example, if I were to print in yellow, I would do it like the following:

Text.literal("this is my string").formatted(Formatting.YELLOW);

What if I want to apply yellow formatting only on "my string"? Is it possible?

sonic wyvern
#

Text.literal("this is ").append(Text.literal("my string").formatted(Formatting.YELLOW));