Two-color grid
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
When working with tilesets that cover a broad range of color values, a single grid color might not be enough, leading to the grid being hard to see on some tiles no matter what color you set it to. I've included a number of examples below.
But first, a proposed solution:
Allow the user to set two grid colors, rather than just one, and draw them alternating. This would allow some part of the grid to contrast well against whatever the user throws as it:

Ideally, the user should be able to set the opacity independently for each color. In this example, since the tileset skews quite dark, I set the white color to a lower opacity than the black. Black here also has a higher opacity than the current grid opacity in Tiled.
Currently, Tiled lets you choose an RGB color and sets the opacity automatically to somewhere around 95.
With this change, it should give the user two RGBA colors instead, and not change the alpha from what the user sets. Alternatively, for a nicer alpha-setting experience, give the user two RGB colors, and provide an opacity slider for each one (the color picker currently just lets you put a numerical value in, but has no slider or preview).
If this suggestion is implemented, the second color should have opacity 0 by default, to produce the same look as the current grid.
This change would have the added benefit of letting users decide how opaque they want the grid to be, even if they stick to using a single color.
This isn't even a particularly high-contrast tileset, but should hopefully demonstrate the limitations of a single-color grid:
White grid, good contrast on the lightest parts, too much elsewhere

Grey grid, good contrast in darker parts, not enough on the light parts

Black grid, okay-ish contrast on light parts, not enough elsewhere

Blue grid, decent contrast on light and dark, but gets lost in the blue, and painful to look at.

Orange grid, decent contrast but blends with the lighter/warmer parts...

I could go on, but almost every color fails somewhere, even within this small, simple region. Neon green works because there's no green here, but that's nearly invisible on large regions of my more tree-heavy project.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by locating the editor's grid-color settings and rendering code; done means supporting two alternating grid colors with independently controlled opacity while preserving the current appearance when the second color is transparent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100