Right now we can only visually customize the color of the text. I think there could be slightly more formatting options. Using something similar to HTML and CSS but in JSON format. see examples below.
align
will make all the text-align dependent on what is defined. "center" will make the text centered. "left" will make the text start on the left and right is the opposite.
/tellraw <target> [{"text":"Centered Text","align":"center"}]
/tellraw <target> [{"text":"Left Text","align":"left"}]
/tellraw <target> [{"text":"Right Text","align":"right"}]
opacity
Will make the text transparent depending on the percentage inputted.
/tellraw <target> [{"text":"10% opacity","opacity":10}]
background_color
Will make the background text the selected color.
/tellraw <target> [{"text":"Text is white, background is black","color":"white","background_color":"black"}]
background_opacity
similar to opacity but for the background of the text. It will only be useable if background_color is used.
/tellraw <target> [{"text":"My Custom Background","background_color":"gold","background_opacity":10}]
hoverEvent & clickEvent formatting.
You can apply formatting to the text when a player hovers or clicks text. Example:
/tellraw <target> [{"text":"Hover over me!","color":"white","hoverEvent":{"color":"dark_blue","underlined":true},"clickEvent":{"color":"blue","underlined":false,"action":"open_url","value":"https://www.minecraft.net/"}}]
Please sign in to leave a comment.
2 Comments