# Suggestion: color multiplier for layers / objects

**URL:** https://discourse.mapeditor.org/t/suggestion-color-multiplier-for-layers-objects/932
**Category:** Suggestions
**Created:** [November 22, 2015, 8:27am UTC](https://discourse.mapeditor.org/t/suggestion-color-multiplier-for-layers-objects/932 "2015-11-22T08:27:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Rasmus\_Hoglund](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@Rasmus\_Hoglund](https://discourse.mapeditor.org/u/Rasmus_Hoglund)
#### Post date: [November 22, 2015, 8:27am UTC](https://discourse.mapeditor.org/t/suggestion-color-multiplier-for-layers-objects/932/1 "2015-11-22T08:27:10Z")

</div>

Hi, I’m pretty new to tiled, so I’m not sure if this has been suggested before.

I’ve just recently migrated my tiled maps to tiled, before I was using an editor I built myself.

A feature I had in my editor, that is useful and I think pretty easy to implement, is to have a color multiplier for layers (and also for individual objects).

That way you could create a background layer with the same tileset just a darker multiplier for the colors.

In a renderer it’s easy to implement just a call to glColor4f() before rendering layer / object.

In the editor it would just be a value for each color compenent (r,g,b).

---

<div class="post-metadata">

### Author: ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)
#### Post date: [November 22, 2015, 10:52am UTC](https://discourse.mapeditor.org/t/suggestion-color-multiplier-for-layers-objects/932/2 "2015-11-22T10:52:12Z")

</div>

> [@Rasmus\_Hoglund](#):
>
> A feature I had in my editor, that is useful and I think pretty easy to implement, is to have a color multiplier for layers (and also for individual objects).

I currently can’t find an issue just about color multiplication, but there is a more general issue about adding support for blend modes:

> <https://github.com/mapeditor/tiled/issues/984>
>
> One interesting capability is to be able to write one's own layer blending, spec…ially the way it combinates layers.
> 
> I myself would like to have the following setup:
> \-One layer has tiles in say, 2,3 or 4 shades of monochrome
> \-Another layer is used to select a palette for the tile above, and will replace each shade of monochrome with a colour, or alternatively, there is one layer for selecting each of the colours of the palette
> 
> and similar. This would require the capability to write one's own blending/layer drawing functions. It would be very useful though, specially for retro dev.

> [@Rasmus\_Hoglund](#):
>
> In a renderer it’s easy to implement just a call to glColor4f() before rendering layer / object.

In an OpenGL-based renderer yes (though `glColor4f` should no longer be used in modern OpenGL) but Tiled is using a software renderer based on [QPainter](http://doc.qt.io/qt-5/qpainter.html), which does not seem to support a color multiplier.

Anyway it’s a feature I would like to support eventually, but I would do it for “Tiled Quick”, a new version of Tiled built on Qt Quick. That project is currently in its infancy though.

---

<div class="post-metadata">

### Author: ![Rasmus\_Hoglund](https://avatars.discourse-cdn.com/v4/letter/r/f4b2a3/32.png) [@Rasmus\_Hoglund](https://discourse.mapeditor.org/u/Rasmus_Hoglund)
#### Post date: [November 23, 2015, 10:47am UTC](https://discourse.mapeditor.org/t/suggestion-color-multiplier-for-layers-objects/932/3 "2015-11-23T10:47:20Z")

</div>

Thank you for your reply.
