mypaint has a more layer effects now, and those strokemap entries contain colour info. I wonder whether we could intensify the stroke’s colour when making the overlay shape, then apply it in an invert-y mode like Difference.
There’s not much scope for changing the shape you see blink on the screen.
Here’s what the overlay is currently made to contain. The source array is 1 bit deep with zeros or ones, the output rgba array uses MyPaint’s internal fix15 representation where numbers are stored between 0 and 2^15 inclusive. This is where colour information could be sent.
It’s called by the following code, which also makes the temporary overlay layer. This is where a mode could be set:
Perhaps this approach is better. The great difficulty, for me, is to see the thin strokes, mainly black, when they are selected/copied.
I did a simple test with a layer where different strokes (colors and widths). Copied this in two layers and I’ve applied Overlay and Difference respectively. When I hidden the original strokes (1st layer)… the contrast is nice… and to black color is also good.