**System Information**
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.95
**Blender Version**
Broken: version: 3.2.0, branch: master, commit date: 2022-06-08 10:22, hash: `rBe05e1e369187`
**Short description of error**
It is impossible to make a precise color selection from two similar colors with Mask by Color alone, because a threshold near or at 0 produces an empty mask. I consider this a bug because according to the comment in the source code, this functionality isn't working as intended. Quote directly from source code (emphasis mine):
https://developer.blender.org/D8157
```
/* sculpt_mask_by_color_delta_get returns values in the (0,1) range that are used to generate the
* mask based on the diference between two colors (the active color and the color of any other
* vertex). Ideally, a threshold of 0 should mask only the colors that are equal to the active
* color and threshold of 1 should mask all colors. In order to avoid artifacts and produce softer
* falloffs in the mask, the MASK_BY_COLOR_SLOPE defines the size of the transition values between
* masked and unmasked vertices. The smaller this value is, the sharper the generated mask is going
* to be. */
```
For completeness, here is a real world scenario where it is nearly imppossible to mask the pants, shirt, or skin because the colors are too close together. {F13155082}
**Exact steps for others to reproduce the error**
Apply two similar colors to a subdivided surface with the paint tool, and try to mask only one of them. The only way to produce a sharp mask is with the Increase Contrast operator when the Threshold is fine tuned to work with it.
{F13155118}