Bug 427104

Summary: 'Gradient Map' texturing mode interprets a pattern's alpha channel as the leftmost colour
Product: [Applications] krita Reporter: elementofyayness
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: dimula73, griffinvalley, vitamorus.art
Priority: NOR    
Version First Reported In: 5.2.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description elementofyayness 2020-09-29 06:14:06 UTC
The Gradient Map texturing mode maps pure black (0,0,0) to the left of the current active gradient, pure white (255,255,255) to the right, and full transparency to the left. However, in pattern previews (the bottom of the Patterns docker, the right of the pattern selector), the alpha channel is displayed visually as white. This leads me to expect that it would've been mapped to the right of the current active gradient.

This effect is most noticeable in a handful of default patterns, such as Squares(01-10) or Cross(01-07), which are comprised only of pure black and full transparency, thus rendering the entire pattern as the leftmost colour.
Comment 1 Dmitry Kazakov 2020-09-29 12:58:44 UTC
It is somehow related to the fact that full-transparent color in Krita is usually considered and black, though it is not guaranteed. Usually, we should premultiply the color with alpha channel to avoid such effects.

The bug is valid and should be fixed I guess.
Comment 2 wolthera 2021-09-08 08:03:54 UTC
Ok, ten this is a UX bug, and we'll need to either...

1. Show the transparency in the pattern more clearly.
2. Or, more intuitively, map transparent to white.
Comment 3 Dmitry Kazakov 2024-08-22 16:39:21 UTC
Remove triaged keyword from CONFIRMED bugs
Comment 4 Vitamorus 2024-12-12 16:58:09 UTC
Re-confirmed for 5.2.6, kinda.

Krita no longer interprets transparency as black, so binary black and white patterns no longer turn completely solid. Instead there's a bit of an question regarding transparency being mapped to white or not.

Like Wolthera said, either transparency needs to be more clearly communicated or transparency should be mapped to white to be more consistent with the preview/thumbnails in the pattern picker. But I would argue that there's use for transparency being kept separate from either black or white. For example, you have a pattern of a chain link fence that goes from black to white in terms of colour and then utilizes transparency between the wires of the fence.

So there's need for a better way to communicate transparency in the pattern picker (checkerboard/no background for the larger preview? a badge on the thumbnails that indicates an alpha channel?).