Color of (Expression) — Skript

Addon: Skript · Category: Expression · Since: 1.2, 2.10 (displays)

Syntax

[the] colo[u]r[s] of %blocks/itemtypes/entities/fireworkeffects/potioneffecttypes/displays%

Description

The <a href='#color'>color</a> of an item, entity, block, firework effect, or text display. This can also be used to color chat messages with "&lt;%color of ...%&gt;this text is colored!". Do note that firework effects support setting, adding, removing, resetting, and deleting; text displays support setting and resetting; and items, entities, and blocks only support setting, and only for very few items/blocks.

Examples

on click on wool:
	if event-block is tagged with minecraft tag "wool":
		message "This wool block is <%color of block%>%color of block%<reset>!"
		set the color of the block to black

View source