ionic-team / ionic-team/capacitor-assets
Adaptive icon does not cover default black background
- Dominant language
- TypeScript
- Stars
- 583
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
I noticed small issue when trying to setup splash screen on Android >= 12.
Namely there's a little bit of black color on the edges of the icon.
The issue is related with https://github.com/ionic-team/capacitor-assets/pull/424 which added `android:inset="16.7%"` to the `foreground` & `background`.
I suppose that due to calculation inaccuracy (1/6 ≈ 16.7%), the background is too small and doesn't cover default background that lies underneath.
### Workaround
Change: `android:inset="16.7%"` to `android:inset="16.6%"`
### Actual (left), Expected (right)

Here's a StackOverflow thread that describes how are icons rendered:
> https://stackoverflow.com/a/49869048/9932919
It links to android source that explains where does that black color come from:
> https://android.googlesource.com/platform/frameworks/base/+/oreo-release/graphics/java/android/graphics/drawable/AdaptiveIconDrawable.java#351
Contributor guide
Assessment
This issue has not been assessed yet.