-
Notifications
You must be signed in to change notification settings - Fork 24
Color Masks Property
Color masks allow mod authors to specify a list of RGB colors to target for color overlays.
If both the ColorMasks and ColorMaskLayers properties are excluded, then the whole sprite will be targeted by the player's color choice.
Note: All color masks are ignored if DisableGrayscale is set to true.
| Property | Required | Description | Default |
|---|---|---|---|
ColorMasks |
true |
The list of RGB colors to use for the color masking / replacement. | [] |
While Color mask layers act primarily the same as the ColorMasks property, the following should be noted:
-
ColorMaskLayersallows for multiple colorable sections, whileColorMasksonly allows for one colorable section to be set. -
ColorMaskLayerscan "protect" colors of an appearance by using itsIgnoreUserColorChoiceproperty.
Note: Using ColorMasks and ColorMaskLayers together is not supported.
Multiple RGB colors can be targeted via ColorMasks, allowing mod authors to specify colors within the sprite that change according to the player's own color choice.
Note: The RGB colors listed in ColorMasks do not have to be grayscale, as they can be any possible RGB color.
Additional note: If the color given is not grayscale, then the color overlay will be treated as additive. This means the resulting color will be a different hue compared to any grayscale counterpart.
Below is the Colorable Mouse Ears, found in the example pack.
Notice that only one color is given (191, 183, 181), which outlines the ears of the sprite.
This means the player's color choice will only be applied to the outline color (191, 183, 181), while the rest of the sprite's color will remain the same.
Example sprite:

{ "Name": "Colorable Mouse Ears", "FrontHat": { "ColorMasks": [ [ 191, 183, 181 ] ], "StartingPosition": { "X": 0, "Y": 0 }, "HeadPosition": { "X": -2, "Y": 0 }, "HatSize": { "Width": 16, "Length": 16 } } }