Skip to content

Commit

Permalink
Adjust colours after feedback on GitHub.
Browse files Browse the repository at this point in the history
Rainbow is lighter, and pastel is from colorbrewer2.

Also reordered themes so most likely to be chosen are shown
first.
  • Loading branch information
pserwylo committed Sep 11, 2023
1 parent a072a80 commit 9ed8a9c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/nicobrailo/pianoli/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Preferences {
private final static String PREF_SELECTED_SOUND_SET = "selectedSoundSet";
private final static String PREF_SELECTED_MELODIES = "selectedMelodies";
private final static String PREF_ENABLE_MELODIES = "enableMelodies";
private static final String DEFAULT_THEME = "boomwhacker";
private static final String DEFAULT_THEME = "rainbow";
private final static String PREF_THEME = "theme";

/**
Expand Down
23 changes: 12 additions & 11 deletions app/src/main/java/com/nicobrailo/pianoli/Theme.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public static Theme fromPreferences(Context context) {
case "pastel":
return PASTEL;

case "rainbow":
return RAINBOW;
case "boomwhacker":
return BOOMWHACKER;

default:
return BOOMWHACKER;
return RAINBOW;
}
}

Expand All @@ -45,13 +45,14 @@ public static Theme fromPreferences(Context context) {

private static final Theme PASTEL = new Theme(
new KeyColour[] {
KeyColour.createLighterWhenPressed(0xffbbcfc4, 0.5f), // pistache
KeyColour.createLighterWhenPressed(0xffb0a99c, 0.5f), // beige
KeyColour.createLighterWhenPressed(0xffffd9a6, 0.5f), // sand
KeyColour.createLighterWhenPressed(0xffce9043, 0.5f), // dun
KeyColour.createLighterWhenPressed(0xfff6c1ce, 0.5f), // lightpink
KeyColour.createLighterWhenPressed(0xffe3777e, 0.5f), // darkpink
KeyColour.createLighterWhenPressed(0xffa65560, 0.5f), // plum
// https://colorbrewer2.org/#type=qualitative&scheme=Pastel1&n=8
KeyColour.createLighterWhenPressed(0xfffbb4ae, 0.5f),
KeyColour.createLighterWhenPressed(0xffb3cde3, 0.5f),
KeyColour.createLighterWhenPressed(0xffccebc5, 0.5f),
KeyColour.createLighterWhenPressed(0xffdecbe4, 0.5f),
KeyColour.createLighterWhenPressed(0xfffed9a6, 0.5f),
KeyColour.createLighterWhenPressed(0xffffffcc, 0.5f),
KeyColour.createLighterWhenPressed(0xffe5d8bd, 0.5f),
}
);

Expand All @@ -63,7 +64,7 @@ public static Theme fromPreferences(Context context) {
KeyColour.createLighterWhenPressed(0xffbde53d, 0.5f), // lightgreen
KeyColour.createLighterWhenPressed(0xfffcc000, 0.5f), // yellow
KeyColour.createLighterWhenPressed(0xffff810a, 0.5f), // lightorange
KeyColour.createLighterWhenPressed(0xffff7416, 0.5f), // darkorange
KeyColour.createLighterWhenPressed(0xffff5616, 0.5f), // darkorange
KeyColour.createLighterWhenPressed(0xffd51016, 0.5f), // red
}
);
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
</string-array>

<string-array name="theme_entryValues">
<item>boomwhacker</item>
<item>black_and_white</item>
<item>pastel</item>
<item>rainbow</item>
<item>pastel</item>
<item>black_and_white</item>
<item>boomwhacker</item>
</string-array>

<string-array name="theme_entries">
<item>@string/theme_boomwhacker</item>
<item>@string/theme_black_and_white</item>
<item>@string/theme_pastel</item>
<item>@string/theme_rainbow</item>
<item>@string/theme_pastel</item>
<item>@string/theme_black_and_white</item>
<item>@string/theme_boomwhacker</item>
</string-array>
</resources>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9ed8a9c

Please sign in to comment.