Interface ModConfigFieldColor

Represents a color configuration field that will be represented as a color picker element in the configuration UI.

interface ModConfigFieldColor {
    defaultValue: [number, number, number, number];
    description?: string;
    id: string;
    isAlphaHidden?: boolean;
    name: string;
    overrideValue?: Binding<null | [number, number, number, number]>;
    type: "color";
    visible?: Binding<boolean>;
}

Hierarchy

  • ModConfigFieldBase
    • ModConfigFieldColor

Properties

defaultValue: [number, number, number, number]

The default value of the color in RGBA format ([0, 255], [0, 255], [0, 255], [0.0, 1.0]).

description?: string

The description for the field that appears in a help tooltip.

id: string

The unique identifier of the configuration element.

isAlphaHidden?: boolean

Whether the alpha channel should be hidden in the color picker.

name: string

The name of the field.

overrideValue?: Binding<null | [number, number, number, number]>

The override value of the color field. If this value is anything other than null, it will override the current value. If the value is overridden, it will also be read only.

type: "color"

The type of the configuration element.

visible?: Binding<boolean>

Determines if the field is visible or not.