Skip to content

Draw svg icons with display-p3 colours - #28

Merged
bardesss merged 1 commit into
mainfrom
svg-colours
Nov 2, 2026
Merged

bardesss merged 1 commit into
mainfrom
svg-colours

Conversation

@bardesss

@bardesss bardesss commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Some svg favicons (for example from design tools) set a plain colour and then a display-p3 one in the same style: fill:#fb4c01;fill:color(display-p3 ...). AndroidSVG takes the second as no fill, so the icon decoded but drew nothing, which hid the letter tile too. A small decoder now drops color(...) declarations before handing the svg to Coil's SvgDecoder, so the plain colour applies.

Test: FaviconCacheTest loads such an svg and checks it draws pixels (fails without the change). testDebugUnitTest, lintDebug and assembleRelease pass locally.

@bardesss
bardesss merged commit 5e69e53 into main Nov 2, 2026
1 check passed
@bardesss
bardesss deleted the svg-colours branch November 2, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant