moko-resources icon indicating copy to clipboard operation
moko-resources copied to clipboard

Moko Resources colors format conflict with android colors in alpha component

Open Pschsch opened this issue 2 years ago • 3 comments

On Android, if we want to declare color with alpha component, we declare it with #[AA][RR][GG][BB] format. In moko resources, format is #[RR][GG][BB][AA]. Why? Shouldn't we save compatibility with Android format in this case?

Pschsch avatar Sep 07 '23 11:09 Pschsch

hi @Pschsch . we decide to use RGBA because KMP is not about android, it's about multiple platforms and ARGB used only on android. to simplify migration android apps we can add flag in gradle plugin extension, that will enable ARGB parsing. what you think?

Alex009 avatar Sep 07 '23 11:09 Alex009

Hmm, sounds good. We could add property to plugin extension to define color parsing pattern

Pschsch avatar Sep 07 '23 16:09 Pschsch

By default it will be RGBA to prevent break of existing users setup

Pschsch avatar Sep 07 '23 16:09 Pschsch