tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Layer tint color doesn't affect shapes

Open afk-mario opened this issue 9 months ago • 3 comments

Describe the bug The tint color property in layers doesn't seem to affect objects, the Color property does tint shapes, but this property is not documented neither in the JSON format or the API.

To Reproduce Steps to reproduce the behavior:

  1. Set the value for Tint color in a layer with shapes. Image
  2. The shapes are not tinted.
  3. Set the value for Color in a layer with shapes. Image
  4. The shapes are tinted.
  5. The Map JSON now has a property color

Expected behavior Tint the shapes when setting the layer property TintColor.

Specifications:

  • OS: Linux
  • Tiled Version: 1.11.2

afk-mario avatar Mar 26 '25 20:03 afk-mario

The color of an Object is usually determined by its class, and if Tints applied, it would make identifying the class of an object quite annoying. The Color layer property exists to avoid this problem, allowing colouring Objects without getting in the way of the class colours.

However, it would be nice to have a layer option to apply the tint to Object colours as well, to make things simpler when the class colours are intended to be cosmetic rather than as identifiers.

eishiya avatar Mar 26 '25 20:03 eishiya

I'm also confused on why there is a color property on the Layer object in the first place, can't find any mentions of it on the Docs or API. I guess it's because the Layer is an object and inherits the color property, and if this is the intended behavior then the property should be documented in the JSON format right?

afk-mario avatar Mar 26 '25 21:03 afk-mario

Sorry, I edited my post above. The Color property exists specifically to allow colouring Objects without getting in the way of the identifying class colours like tinting would.

The property should be documented, but it's possible the TMJ docs were forgotten when it was added. It's there in the TMX docs, at least.

eishiya avatar Mar 26 '25 21:03 eishiya