Use darker colors for artist images (#984)
* Use darker colors for artist images Fixes #983 Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com> * Use material colors Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com> * Update generate-themes.pl Signed-off-by: mueller-ma <mueller-ma@users.noreply.github.com>
This commit is contained in:
parent
cf57d2a5aa
commit
fdec4d50da
@ -411,7 +411,9 @@ public final class CoverBitmap {
|
|||||||
Paint paint = new Paint();
|
Paint paint = new Paint();
|
||||||
|
|
||||||
// Picks a semi-random color from tiles_colors.xml
|
// Picks a semi-random color from tiles_colors.xml
|
||||||
TypedArray colors = context.getResources().obtainTypedArray(R.array.letter_tile_colors);
|
TypedValue tv = new TypedValue();
|
||||||
|
context.getTheme().resolveAttribute(R.attr.themed_letter_tile_colors, tv, false);
|
||||||
|
TypedArray colors = context.getResources().obtainTypedArray(tv.data);
|
||||||
int color = colors.getColor(Math.abs(title.hashCode()) % colors.length(), 0);
|
int color = colors.getColor(Math.abs(title.hashCode()) % colors.length(), 0);
|
||||||
colors.recycle();
|
colors.recycle();
|
||||||
paint.setColor(color);
|
paint.setColor(color);
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
<item name="android:colorAccent">#ffd8d8d8</item>
|
<item name="android:colorAccent">#ffd8d8d8</item>
|
||||||
<item name="android:colorPrimary">#ff000000</item>
|
<item name="android:colorPrimary">#ff000000</item>
|
||||||
<item name="android:colorPrimaryDark">#ff000000</item>
|
<item name="android:colorPrimaryDark">#ff000000</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Amoled_dark.Playback" parent="Amoled_dark.VanillaBase">
|
<style name="Amoled_dark.Playback" parent="Amoled_dark.VanillaBase">
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<item name="android:colorAccent">#FF03A9F4</item>
|
<item name="android:colorAccent">#FF03A9F4</item>
|
||||||
<item name="android:colorPrimary">#FF0277BD</item>
|
<item name="android:colorPrimary">#FF0277BD</item>
|
||||||
<item name="android:colorPrimaryDark">#FF01579B</item>
|
<item name="android:colorPrimaryDark">#FF01579B</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Blue_dark.Playback" parent="Blue_dark.VanillaBase">
|
<style name="Blue_dark.Playback" parent="Blue_dark.VanillaBase">
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
<item name="android:colorAccent">#FF03A9F4</item>
|
<item name="android:colorAccent">#FF03A9F4</item>
|
||||||
<item name="android:colorPrimary">#FF0277BD</item>
|
<item name="android:colorPrimary">#FF0277BD</item>
|
||||||
<item name="android:colorPrimaryDark">#FF01579B</item>
|
<item name="android:colorPrimaryDark">#FF01579B</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Blue_light.Playback" parent="Blue_light.VanillaBase">
|
<style name="Blue_light.Playback" parent="Blue_light.VanillaBase">
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<item name="android:colorAccent">#ffd8d8d8</item>
|
<item name="android:colorAccent">#ffd8d8d8</item>
|
||||||
<item name="android:colorPrimary">#ff212121</item>
|
<item name="android:colorPrimary">#ff212121</item>
|
||||||
<item name="android:colorPrimaryDark">#ff090909</item>
|
<item name="android:colorPrimaryDark">#ff090909</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Grey_dark.Playback" parent="Grey_dark.VanillaBase">
|
<style name="Grey_dark.Playback" parent="Grey_dark.VanillaBase">
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
<item name="android:colorAccent">#ff000000</item>
|
<item name="android:colorAccent">#ff000000</item>
|
||||||
<item name="android:colorPrimary">#ff212121</item>
|
<item name="android:colorPrimary">#ff212121</item>
|
||||||
<item name="android:colorPrimaryDark">#ff090909</item>
|
<item name="android:colorPrimaryDark">#ff090909</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Grey_light.Playback" parent="Grey_light.VanillaBase">
|
<style name="Grey_light.Playback" parent="Grey_light.VanillaBase">
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<item name="android:colorAccent">#FFF57F17</item>
|
<item name="android:colorAccent">#FFF57F17</item>
|
||||||
<item name="android:colorPrimary">#FFE65100</item>
|
<item name="android:colorPrimary">#FFE65100</item>
|
||||||
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Orange_dark.Playback" parent="Orange_dark.VanillaBase">
|
<style name="Orange_dark.Playback" parent="Orange_dark.VanillaBase">
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
<item name="android:colorAccent">#FFF57F17</item>
|
<item name="android:colorAccent">#FFF57F17</item>
|
||||||
<item name="android:colorPrimary">#FFE65100</item>
|
<item name="android:colorPrimary">#FFE65100</item>
|
||||||
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
<item name="android:colorPrimaryDark">#FFBF360C</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Orange_light.Playback" parent="Orange_light.VanillaBase">
|
<style name="Orange_light.Playback" parent="Orange_light.VanillaBase">
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<item name="android:colorAccent">#ffd50000</item>
|
<item name="android:colorAccent">#ffd50000</item>
|
||||||
<item name="android:colorPrimary">#ffc62828</item>
|
<item name="android:colorPrimary">#ffc62828</item>
|
||||||
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Red_dark.Playback" parent="Red_dark.VanillaBase">
|
<style name="Red_dark.Playback" parent="Red_dark.VanillaBase">
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
<item name="android:colorAccent">#ffd50000</item>
|
<item name="android:colorAccent">#ffd50000</item>
|
||||||
<item name="android:colorPrimary">#ffc62828</item>
|
<item name="android:colorPrimary">#ffc62828</item>
|
||||||
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
<item name="android:colorPrimaryDark">#ffb71c1c</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Red_light.Playback" parent="Red_light.VanillaBase">
|
<style name="Red_light.Playback" parent="Red_light.VanillaBase">
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
<item name="android:colorAccent">#ff3e677a</item>
|
<item name="android:colorAccent">#ff3e677a</item>
|
||||||
<item name="android:colorPrimary">#ff37474f</item>
|
<item name="android:colorPrimary">#ff37474f</item>
|
||||||
<item name="android:colorPrimaryDark">#ff263238</item>
|
<item name="android:colorPrimaryDark">#ff263238</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Standard_dark.Playback" parent="Standard_dark.VanillaBase">
|
<style name="Standard_dark.Playback" parent="Standard_dark.VanillaBase">
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
<item name="android:colorAccent">#ff3e677a</item>
|
<item name="android:colorAccent">#ff3e677a</item>
|
||||||
<item name="android:colorPrimary">#ff37474f</item>
|
<item name="android:colorPrimary">#ff37474f</item>
|
||||||
<item name="android:colorPrimaryDark">#ff263238</item>
|
<item name="android:colorPrimaryDark">#ff263238</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Playback" parent="VanillaBase">
|
<style name="Playback" parent="VanillaBase">
|
||||||
|
@ -7,4 +7,5 @@
|
|||||||
<attr name="controls_normal" format="color" />
|
<attr name="controls_normal" format="color" />
|
||||||
<attr name="controls_active" format="color" />
|
<attr name="controls_active" format="color" />
|
||||||
<attr name="background_circle_color" format="color" />
|
<attr name="background_circle_color" format="color" />
|
||||||
|
<attr name="themed_letter_tile_colors" format="reference" />
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -32,6 +32,7 @@ THE SOFTWARE.
|
|||||||
<item name="controls_normal">#fff5f5f5</item>
|
<item name="controls_normal">#fff5f5f5</item>
|
||||||
<item name="controls_active">@android:color/holo_blue_dark</item>
|
<item name="controls_active">@android:color/holo_blue_dark</item>
|
||||||
<item name="android:scrollbarStyle">outsideInset</item>
|
<item name="android:scrollbarStyle">outsideInset</item>
|
||||||
|
<item name="themed_letter_tile_colors">@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Playback" parent="VanillaBase">
|
<style name="Playback" parent="VanillaBase">
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<array name="letter_tile_colors">
|
<array name="letter_tile_colors_light">
|
||||||
<item>#DB4437</item>
|
<item>#DB4437</item>
|
||||||
<item>#E91E63</item>
|
<item>#E91E63</item>
|
||||||
<item>#9C27B0</item>
|
<item>#9C27B0</item>
|
||||||
@ -32,4 +32,21 @@
|
|||||||
<item>#FF5722</item>
|
<item>#FF5722</item>
|
||||||
<item>#757575</item>
|
<item>#757575</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
|
<array name="letter_tile_colors_dark">
|
||||||
|
<item>#A81104</item>
|
||||||
|
<item>#AD1457</item>
|
||||||
|
<item>#6A1B9A</item>
|
||||||
|
<item>#4527A0</item>
|
||||||
|
<item>#283593</item>
|
||||||
|
<item>#0F52C1</item>
|
||||||
|
<item>#0277BD</item>
|
||||||
|
<item>#006064</item>
|
||||||
|
<item>#00695C</item>
|
||||||
|
<item>#006A25</item>
|
||||||
|
<item>#558B2F</item>
|
||||||
|
<item>#E65100</item>
|
||||||
|
<item>#D84315</item>
|
||||||
|
<item>#424242</item>
|
||||||
|
</array>
|
||||||
</resources>
|
</resources>
|
||||||
|
2
generate-themes.pl
Normal file → Executable file
2
generate-themes.pl
Normal file → Executable file
@ -117,6 +117,7 @@ EOF
|
|||||||
<item name="android:colorAccent">$this->{colorAccent}</item>
|
<item name="android:colorAccent">$this->{colorAccent}</item>
|
||||||
<item name="android:colorPrimary">$this->{colorPrimary}</item>
|
<item name="android:colorPrimary">$this->{colorPrimary}</item>
|
||||||
<item name="android:colorPrimaryDark">$this->{colorPrimaryDark}</item>
|
<item name="android:colorPrimaryDark">$this->{colorPrimaryDark}</item>
|
||||||
|
<item name="themed_letter_tile_colors">\@array/letter_tile_colors_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="${tid}Playback" parent="${tid}VanillaBase">
|
<style name="${tid}Playback" parent="${tid}VanillaBase">
|
||||||
@ -159,6 +160,7 @@ EOF
|
|||||||
<item name="android:colorAccent">$this->{colorAccent}</item>
|
<item name="android:colorAccent">$this->{colorAccent}</item>
|
||||||
<item name="android:colorPrimary">$this->{colorPrimary}</item>
|
<item name="android:colorPrimary">$this->{colorPrimary}</item>
|
||||||
<item name="android:colorPrimaryDark">$this->{colorPrimaryDark}</item>
|
<item name="android:colorPrimaryDark">$this->{colorPrimaryDark}</item>
|
||||||
|
<item name="themed_letter_tile_colors">\@array/letter_tile_colors_dark</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="${tid}Playback" parent="${tid}VanillaBase">
|
<style name="${tid}Playback" parent="${tid}VanillaBase">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user