Repository navigation
Colour Predicate Format
ioblackshaw edited this page Jun 23, 2025
·
7 revisions
Colour Predicates are used in some tests in the when part of a Colour Override Definition. They can be used for more powerful colour checks such as; matching against a range of colours, matching against sign text colours, etc.
Below is an example of the sign_dye colour predicate specified as the color test in the when part:
"color": {
"type": "eg_text_customiser:sign_dye",
"dye": "orange"
}Colour Predicates are defined with a type field, alongside additional properties specified by the predicate type
The following tests can be specified in the when part
| Field | Format | Examples | Notes |
|---|---|---|---|
type |
The resource location of a colour predicate type |
"eg_text_customiser:sign_dye", "eg_text_customiser:simple"
|
|
<type specific fields> |
Additional fields specified by the colour predicate type |
Below are all the currently supported colour predicate types
Performs a simple equality check on a colour
| Additional Fields | Format | Examples | Notes |
|---|---|---|---|
value |
A hexadecimal colour string, RGB integer list in 0-255 range, or Named colour |
"#ff00ff" [255,128,0] "red"
|