[bug] lint_design contrast treats gradient (and translucent) backgrounds as white #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected: contrast rule samples a gradient background (e.g. its average or darkest/lightest stop) and composites rgba fills over the ancestor, so light text on a dark gradient passes.
Actual: text on a frame whose only fill is a gradient is checked against #ffffff ("text #cdd6f4 on #ffffff is 1.4:1"); text on translucent rgba fills is composited onto white (#b8b8b8, #c7c7c7). Every text layer in a dark gradient design reports an error.
Repro: create_artboard 400x200, write_html
<div style="background:radial-gradient(#2a2140 0%, #0d0d14 100%);padding:24px"><div style="color:#cdd6f4;font-size:14px">Hello</div></div>, lint_design → contrast error 1.4:1 on #ffffff.Workaround: none short of adding a solid fill; ignore the errors.
Impact: dozens of false errors per page hide real contrast problems.
Filed from PaperCraft 0.7.3 (macos).
Fixed in
75faf3eon branch debrand.