Skip to content

RGBA

Provides an RGBA color (which is then converted to ARGB.)

Type ID: kaya:rgba

Format

Field Type Default Description
red Float The red component of the color. The value should be within the range of 0.0 to 1.0.
green Float The green component of the color. The value should be within the range of 0.0 to 1.0.
blue Float The blue component of the color. The value should be within the range of 0.0 to 1.0.
alpha Float The alpha (transparency) component of the color. The value should be within the range of 0.0 to 1.0.
Tip

This type can be inlined as a hexadecimal string. (#RRGGBBAA) The string must be prefixed with #, otherwise, it will return an error.

Example

{
    "type": "kaya:rgba",
    "red": 1.0,
    "green": 1.0,
    "blue": 0.0,
    "alpha": 0.5
}
"#ffff0080"

This example provides a translucent yellow RGBA color.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.