feat: new app icon and color scheme #143
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New App Icon
As with so many Android topics, trying to do it "the right way" was a real mess.
Design
The entry point on the Android developers page "Create App Icons" refers us to another developers page "Adaptive Icons" and also this page on the material design rules of designing product icons.
Using these guidelines and a back-of-the-napkin icon idea my mom came up with, we designed this new icon:
So far, so awesome 🔥.
App Icon Integration
Now to integrate the icon into the app... Since Android xml do not support "advanced" drop shadows like the ones recommended by their own design guide, we decided to draw the icon in figma, export it as
.png
and import it again into Android Studio. But how large should the image be? And which portion of the image should our icon fill? The android icon design specifications tell us that icons should have a size of512 x 512
of which the product icon keylines should not use more than the inner384 x 384
(75%):FYI, this is how our icon looks inside the keylines:
This shouldn't be hard - let's try it in Android Studios "Asset Studio" (Resource manager > Add > Image Asset):
Woah, that's way to big! So
75%
is not it... let's export only the keylines and see if we can reverse engineer the scaling factorOk, so it looks like we need a scaling factor of
66%
to fit the keyline into the "safe zone". Let's quickly check our keyline is lined up with the keyline in the asset studio...What?! Now it looks like we need to scale it down to
58%
in order for the lines to fit roughly onto the grid displayed in asset studio (Btw. I compared to two different grids, figma vs. Asset Studio to the material 3 template and the figma grid is the correct one... Android Studio beeing outdated).So finally, here is our new icon scaled down to
58%
in the asset studio:Although these inconsistencies leave a bit of a sour aftertaste, we can live with this for now and finally have a process for integrating our app icon (To make bad things worse, the Android Developers page on "Adaptive Icons" describes another scaling entirely1).
Export / Import process
512w
from figma ->images/musikus_icon_foreground.png
512w
from figma ->images/musikus_icon_background.png
58%
and hit finish<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
back to ic_launcher.xml and ic_launcher_round.xml since it gets removed by Asset Studio 😒512w
from figma ->app/src/main/ic_launcher-playstore.png
Monochrome Icon
To add support for monochrome icons to the app, we need only two thing. First, our app icon without background, without shadows and with a uniform color. This can then be imported into Android Studio using the Asset Studio just like the main icon. The only thing we need to do is revert all files the wizard changes except for the new 'ic_launcher_monochrome.webp' files. Afterwards, we have to add the
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
to to ic_launcher.xml and ic_launcher_round.xml if they are not already there.One thing we have to consider is the size of the icon. The monochrome icons from Google appear to be quite a bit smaller than the default version, so we decided to also decrease the scaling of the monochrome icon from
58%
to50%
.And this is out final product ❤
Todo:
Fixes: #26, #99
Footnotes
"Safe zone" according to the "Adaptive Icons" page in the Android devs documentation. Here, the full size of the icon should be 108dp with the inner 66dp being the "safe zone".
66/108 = 0.61
, so neither75%
nor66%
nor58%
. ↩