diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ChoreEntryAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ChoreEntryAdapter.java index e0be5ffc3..688a40b98 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ChoreEntryAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ChoreEntryAdapter.java @@ -150,15 +150,13 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD ResourcesCompat.getFont(context, R.font.jost_medium) ); - ColorRoles colorBlue = ResUtil.getHarmonizedRoles(context, R.color.blue); - ColorRoles colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); int color; if (days < 0) { color = ResUtil.getColorAttr(context, R.attr.colorError); } else if (days == 0) { - color = colorBlue.getAccent(); + color = ResUtil.getColorAttr(context, R.attr.colorCustomBlue); } else { - color = colorYellow.getAccent(); + color = ResUtil.getColorAttr(context, R.attr.colorCustomYellow); } holder.binding.days.setTextColor(color); holder.binding.daysHuman.setTextColor(color); diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/MealPlanEntryAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/MealPlanEntryAdapter.java index e69f7561e..25facbf6e 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/MealPlanEntryAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/MealPlanEntryAdapter.java @@ -267,7 +267,6 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD binding.timelineView.setPosition(entry.getItemPosition()); Context context = binding.getRoot().getContext(); - ColorRoles colorBlue = ResUtil.getHarmonizedRoles(context, R.color.blue); binding.title.setText(entry.getType()); binding.picture.setVisibility(View.GONE); diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionAdapter.java index 832e219a0..00ecfecf0 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionAdapter.java @@ -74,9 +74,7 @@ public class RecipePositionAdapter extends private final PluralUtil pluralUtil; private final int maxDecimalPlacesAmount; - private final ColorRoles colorGreen; - private final ColorRoles colorYellow; - private final int colorRed; + private final int colorGreen, colorYellow, colorRed; public RecipePositionAdapter( Context context, @@ -110,8 +108,8 @@ public RecipePositionAdapter( this.listener = listener; this.pluralUtil = new PluralUtil(context); - colorGreen = ResUtil.getHarmonizedRoles(context, R.color.green); - colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); + colorGreen = ResUtil.getColorAttr(context, R.attr.colorCustomGreen); + colorYellow = ResUtil.getColorAttr(context, R.attr.colorCustomYellow); colorRed = ResUtil.getColorAttr(context, R.attr.colorError); } @@ -262,9 +260,7 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD R.drawable.ic_round_check_circle_outline, null )); - holder.binding.imageFulfillment.setImageTintList( - ColorStateList.valueOf(colorGreen.getAccent()) - ); + holder.binding.imageFulfillment.setImageTintList(ColorStateList.valueOf(colorGreen)); holder.binding.missing.setVisibility(View.GONE); } else { holder.binding.fulfilled.setText(R.string.msg_recipes_not_enough); @@ -276,9 +272,7 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD null )); holder.binding.imageFulfillment.setImageTintList( - ColorStateList.valueOf( - amountShoppingList >= amountMissing ? colorYellow.getAccent() : colorRed - ) + ColorStateList.valueOf(amountShoppingList >= amountMissing ? colorYellow : colorRed) ); holder.binding.missing.setText( context.getString( diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionResolvedAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionResolvedAdapter.java index 587c76042..3a91e4a32 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionResolvedAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/RecipePositionResolvedAdapter.java @@ -80,9 +80,7 @@ public class RecipePositionResolvedAdapter extends private final PluralUtil pluralUtil; private final int maxDecimalPlacesAmount; private final int maxDecimalPlacesPrice; - private final ColorRoles colorGreen; - private final ColorRoles colorYellow; - private final int colorRed; + private final int colorGreen, colorYellow, colorRed; private final String energyUnit; private final String currency; @@ -119,8 +117,8 @@ public RecipePositionResolvedAdapter( this.listener = listener; this.pluralUtil = new PluralUtil(context); - colorGreen = ResUtil.getHarmonizedRoles(context, R.color.green); - colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); + colorGreen = ResUtil.getColorAttr(context, R.attr.colorCustomGreen); + colorYellow = ResUtil.getColorAttr(context, R.attr.colorCustomYellow); colorRed = ResUtil.getColorAttr(context, R.attr.colorError); } @@ -329,9 +327,7 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD R.drawable.ic_round_check_circle_outline, null )); - holder.binding.imageFulfillment.setImageTintList( - ColorStateList.valueOf(colorGreen.getAccent()) - ); + holder.binding.imageFulfillment.setImageTintList(ColorStateList.valueOf(colorGreen)); holder.binding.missing.setVisibility(View.GONE); } else { double amountMissing = conversion != null @@ -350,9 +346,7 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD null )); holder.binding.imageFulfillment.setImageTintList( - ColorStateList.valueOf( - amountShoppingList >= amountMissing ? colorYellow.getAccent() : colorRed - ) + ColorStateList.valueOf(amountShoppingList >= amountMissing ? colorYellow : colorRed) ); holder.binding.missing.setText( context.getString( diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingListItemAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingListItemAdapter.java index d481a9018..22afd7d3a 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingListItemAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingListItemAdapter.java @@ -401,7 +401,6 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD RowShoppingListItemBinding binding = ((ShoppingListItemViewHolder) viewHolder).binding; Context context = binding.getRoot().getContext(); - ColorRoles colorBlue = ResUtil.getHarmonizedRoles(context, R.color.blue); // NAME @@ -472,8 +471,10 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD } Chip chipAmount = createChip(context, stringBuilderAmount.toString()); if (item.hasProduct() && missingProductIds.contains(item.getProductIdInt())) { - chipAmount.setTextColor(colorBlue.getOnAccentContainer()); - chipAmount.setChipBackgroundColor(ColorStateList.valueOf(colorBlue.getAccentContainer())); + chipAmount.setTextColor(ResUtil.getColorAttr(context, R.attr.colorOnCustomBlueContainer)); + chipAmount.setChipBackgroundColor(ColorStateList.valueOf( + ResUtil.getColorAttr(context, R.attr.colorCustomBlueContainer) + )); } if (item.isUndone()) { chipAmount.setPaintFlags(chipAmount.getPaintFlags() & (~Paint.STRIKE_THRU_TEXT_FLAG)); diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingModeItemAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingModeItemAdapter.java index 90ee51436..6ea3bd376 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingModeItemAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/ShoppingModeItemAdapter.java @@ -355,8 +355,6 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD ShoppingListItem item = (ShoppingListItem) groupedListItem; RowShoppingModeItemBinding binding = ((ShoppingItemViewHolder) viewHolder).binding; - ColorRoles colorBlue = ResUtil.getHarmonizedRoles(context, R.color.blue); - if (useSmallerFonts) { int dp8 = UiUtil.dpToPx(binding.name.getContext(), 8); binding.card.setContentPadding(dp8, 0, dp8, 0); @@ -439,8 +437,10 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD } Chip chipAmount = createChip(context, stringBuilderAmount.toString()); if (item.hasProduct() && missingProductIds.contains(item.getProductIdInt())) { - chipAmount.setTextColor(colorBlue.getOnAccentContainer()); - chipAmount.setChipBackgroundColor(ColorStateList.valueOf(colorBlue.getAccentContainer())); + chipAmount.setTextColor(ResUtil.getColorAttr(context, R.attr.colorOnCustomBlueContainer)); + chipAmount.setChipBackgroundColor(ColorStateList.valueOf( + ResUtil.getColorAttr(context, R.attr.colorCustomBlueContainer) + )); } if (item.isUndone()) { chipAmount.setPaintFlags(chipAmount.getPaintFlags() & (~Paint.STRIKE_THRU_TEXT_FLAG)); diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockEntryAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockEntryAdapter.java index d500bc817..0d800f0a2 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockEntryAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockEntryAdapter.java @@ -328,16 +328,13 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD ResourcesCompat.getFont(context, R.font.jost_medium) ); - ColorRoles colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); - ColorRoles colorOrange = ResUtil.getHarmonizedRoles(context, R.color.orange); - int color; if (Integer.parseInt(days) >= 0) { - color = colorYellow.getAccent(); + color = ResUtil.getColorAttr(context, R.attr.colorCustomYellow); } else if (product != null && product.getDueDateTypeInt() == StockItem.DUE_TYPE_EXPIRATION) { color = ResUtil.getColorAttr(context, R.attr.colorError); } else { - color = colorOrange.getAccent(); // formally DIRT + color = ResUtil.getColorAttr(context, R.attr.colorCustomOrange); } holder.binding.dueDate.setTextColor(color); } else { diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockOverviewItemAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockOverviewItemAdapter.java index 57336ed0f..0d037658c 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockOverviewItemAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/StockOverviewItemAdapter.java @@ -349,10 +349,6 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD Context context = holder.binding.getRoot().getContext(); - ColorRoles colorBlue = ResUtil.getHarmonizedRoles(context, R.color.blue); - ColorRoles colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); - ColorRoles colorOrange = ResUtil.getHarmonizedRoles(context, R.color.orange); - holder.binding.flexboxLayout.removeAllViews(); // NAME @@ -365,7 +361,7 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD && shoppingListFeatureEnabled) { holder.binding.viewOnShoppingList.setVisibility(View.VISIBLE); holder.binding.viewOnShoppingList.setBackgroundTintList( - ColorStateList.valueOf(colorBlue.getAccent()) + ColorStateList.valueOf(ResUtil.getColorAttr(context, R.attr.colorCustomBlue)) ); } else { holder.binding.viewOnShoppingList.setVisibility(View.GONE); @@ -378,14 +374,16 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD ); if (activeFields.contains(StockOverviewViewModel.FIELD_AMOUNT)) { + int colorBlueContainer = ResUtil.getColorAttr(context, R.attr.colorCustomBlueContainer); + int colorOnBlueContainer = ResUtil.getColorAttr(context, R.attr.colorOnCustomBlueContainer); StringBuilder stringBuilderAmount = new StringBuilder(); if (!stockItem.getProduct().getNoOwnStockBoolean()) { AmountUtil.addStockAmountNormalInfo(context, pluralUtil, stringBuilderAmount, stockItem, quantityUnitStock, maxDecimalPlacesAmount); Chip chipAmount = createChip(context, stringBuilderAmount.toString()); if (missingItemsProductIds.contains(stockItem.getProductId())) { - chipAmount.setTextColor(colorBlue.getOnAccentContainer()); - chipAmount.setChipBackgroundColor(ColorStateList.valueOf(colorBlue.getAccentContainer())); + chipAmount.setTextColor(colorOnBlueContainer); + chipAmount.setChipBackgroundColor(ColorStateList.valueOf(colorBlueContainer)); } holder.binding.flexboxLayout.addView(chipAmount); } @@ -395,8 +393,8 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD if (!stringBuilderAmountAggregated.toString().isBlank()) { Chip chipAmountAggregated = createChip(context, stringBuilderAmountAggregated.toString()); if (missingItemsProductIds.contains(stockItem.getProductId())) { - chipAmountAggregated.setTextColor(colorBlue.getOnAccentContainer()); - chipAmountAggregated.setChipBackgroundColor(ColorStateList.valueOf(colorBlue.getAccentContainer())); + chipAmountAggregated.setTextColor(colorOnBlueContainer); + chipAmountAggregated.setChipBackgroundColor(ColorStateList.valueOf(colorBlueContainer)); } holder.binding.flexboxLayout.addView(chipAmountAggregated); } @@ -419,11 +417,15 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD if (Integer.parseInt(days) <= daysExpiringSoon && !stockItem.getProduct().getNoOwnStockBoolean()) { // don't color days text if product has no own stock (children will be colored) if (Integer.parseInt(days) >= 0) { - chipDate.setTextColor(colorYellow.getOnAccentContainer()); - chipDate.setChipBackgroundColor(ColorStateList.valueOf(colorYellow.getAccentContainer())); + chipDate.setTextColor(ResUtil.getColorAttr(context, R.attr.colorOnCustomYellowContainer)); + chipDate.setChipBackgroundColor(ColorStateList.valueOf( + ResUtil.getColorAttr(context, R.attr.colorCustomYellowContainer) + )); } else if (stockItem.getDueTypeInt() == StockItem.DUE_TYPE_BEST_BEFORE) { - chipDate.setTextColor(colorOrange.getOnAccentContainer()); - chipDate.setChipBackgroundColor(ColorStateList.valueOf(colorOrange.getAccentContainer())); // formally DIRT + chipDate.setTextColor(ResUtil.getColorAttr(context, R.attr.colorOnCustomOrangeContainer)); + chipDate.setChipBackgroundColor(ColorStateList.valueOf( + ResUtil.getColorAttr(context, R.attr.colorCustomOrangeContainer) + )); } else { chipDate.setTextColor(ResUtil.getColorAttr(context, R.attr.colorOnErrorContainer)); chipDate.setChipBackgroundColor( diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/TaskEntryAdapter.java b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/TaskEntryAdapter.java index b0cba3238..db4ce894d 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/adapter/TaskEntryAdapter.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/adapter/TaskEntryAdapter.java @@ -154,15 +154,13 @@ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, int positionD ResourcesCompat.getFont(context, R.font.jost_medium) ); - ColorRoles colorBlue = ResUtil.getHarmonizedRoles(context, R.color.blue); - ColorRoles colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); int color; if (days < 0) { color = ResUtil.getColorAttr(context, R.attr.colorError); } else if (days == 0) { - color = colorBlue.getAccent(); + color = ResUtil.getColorAttr(context, R.attr.colorCustomBlue); } else { - color = colorYellow.getAccent(); + color = ResUtil.getColorAttr(context, R.attr.colorCustomYellow); } holder.binding.days.setTextColor(color); } else { diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ConsumeFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ConsumeFragment.java index a6aee2d83..769f0dc7b 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ConsumeFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ConsumeFragment.java @@ -210,13 +210,13 @@ public void onViewCreated(@Nullable View view, @Nullable Bundle savedInstanceSta || viewModel.isProductWillBeFilled()) && viewModel.getFormData().isScannerVisible() ); - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); + int colorBlue = ResUtil.getColorAttr(activity, R.attr.colorCustomBlue); viewModel.getQuickModeEnabled().observe( getViewLifecycleOwner(), value -> binding.toolbar.setTitleTextColor( - value ? roles.getAccent() : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) + value ? colorBlue : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) ) ); - binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(colorBlue)); viewModel.getFormData().getQuantityUnitErrorLive().observe( getViewLifecycleOwner(), value -> binding.textQuantityUnit.setTextColor( ResUtil.getColorAttr(activity, value ? R.attr.colorError : R.attr.colorOnSurfaceVariant) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/InventoryFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/InventoryFragment.java index 163eb1790..0f99244af 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/InventoryFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/InventoryFragment.java @@ -186,14 +186,14 @@ public void onViewCreated(@Nullable View view, @Nullable Bundle savedInstanceSta || viewModel.isProductWillBeFilled()) && viewModel.getFormData().isScannerVisible() ); - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); + int colorBlue = ResUtil.getColorAttr(activity, R.attr.colorCustomBlue); viewModel.getQuickModeEnabled().observe( getViewLifecycleOwner(), value -> binding.toolbar.setTitleTextColor( - value ? roles.getAccent() : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) + value ? colorBlue : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) ) ); - binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); - binding.textInputPurchasePrice.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(colorBlue)); + binding.textInputPurchasePrice.setHelperTextColor(ColorStateList.valueOf(colorBlue)); viewModel.getFormData().getDueDateErrorLive().observe( getViewLifecycleOwner(), value -> binding.textDueDate.setTextColor( ResUtil.getColorAttr(activity, value ? R.attr.colorError : R.attr.colorOnSurfaceVariant) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatBarcodesEditFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatBarcodesEditFragment.java index feb4ded7e..27ea59587 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatBarcodesEditFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatBarcodesEditFragment.java @@ -134,8 +134,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat viewModel.getInfoFullscreenLive().setValue(infoFullscreen); }); - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); - binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf( + ResUtil.getColorAttr(activity, R.attr.colorCustomBlue) + )); embeddedFragmentScanner.setScannerVisibilityLive( viewModel.getFormData().getScannerVisibilityLive() diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatConversionsEditFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatConversionsEditFragment.java index 748a615c2..9516ea492 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatConversionsEditFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/MasterProductCatConversionsEditFragment.java @@ -150,8 +150,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat viewModel.getInfoFullscreenLive().setValue(infoFullscreen); }); - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); - binding.textInputFactor.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputFactor.setHelperTextColor(ColorStateList.valueOf( + ResUtil.getColorAttr(activity, R.attr.colorCustomBlue) + )); // necessary because else getValue() doesn't give current value (?) viewModel.getFormData().getQuantityUnitsLive().observe(getViewLifecycleOwner(), qUs -> { diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/OverviewStartFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/OverviewStartFragment.java index 907e768b3..bd7a4a094 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/OverviewStartFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/OverviewStartFragment.java @@ -189,9 +189,12 @@ public void onGlobalLayout() { // DEBUG LABEL if (BuildConfig.DEBUG) { - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.yellow); - binding.imageLabelDebug.setColorFilter(roles.getOnAccent()); - binding.imageLabelDebugBg.setColorFilter(roles.getAccent()); + binding.imageLabelDebug.setColorFilter( + ResUtil.getColorAttr(activity, R.attr.colorOnCustomYellow) + ); + binding.imageLabelDebugBg.setColorFilter( + ResUtil.getColorAttr(activity, R.attr.colorCustomYellow) + ); } // UPDATE UI diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/PurchaseFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/PurchaseFragment.java index e943905f9..2ea3cefd2 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/PurchaseFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/PurchaseFragment.java @@ -264,14 +264,14 @@ public void onViewCreated(@Nullable View view, @Nullable Bundle savedInstanceSta || viewModel.isProductWillBeFilled()) && viewModel.getFormData().isScannerVisible() ); - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); + int colorBlue = ResUtil.getColorAttr(activity, R.attr.colorCustomBlue); viewModel.getQuickModeEnabled().observe( getViewLifecycleOwner(), value -> binding.toolbar.setTitleTextColor( - value ? roles.getAccent() : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) + value ? colorBlue : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) ) ); - binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); - binding.textInputPurchasePrice.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(colorBlue)); + binding.textInputPurchasePrice.setHelperTextColor(ColorStateList.valueOf(colorBlue)); viewModel.getFormData().getDueDateErrorLive().observe( getViewLifecycleOwner(), value -> binding.textDueDate.setTextColor( ResUtil.getColorAttr(activity, value ? R.attr.colorError : R.attr.colorOnSurfaceVariant) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/RecipeFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/RecipeFragment.java index b463db263..57c69a04d 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/RecipeFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/RecipeFragment.java @@ -175,8 +175,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat activity.navUtil.navigateFragment(R.id.photoViewerFragment, argsPhotoViewer); }); - ColorRoles colorYellow = ResUtil.getHarmonizedRoles(requireContext(), R.color.yellow); - binding.buttonFulfillmentInfo.setIconTint(ColorStateList.valueOf(colorYellow.getAccent())); + binding.buttonFulfillmentInfo.setIconTint(ColorStateList.valueOf( + ResUtil.getColorAttr(activity, R.attr.colorCustomYellow) + )); binding.recycler.setLayoutManager( new LinearLayoutManager(activity, LinearLayoutManager.VERTICAL, false) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/SettingsCatServerFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/SettingsCatServerFragment.java index 03a2d02cf..2edbe03d2 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/SettingsCatServerFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/SettingsCatServerFragment.java @@ -97,9 +97,10 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat binding.swipe.setEnabled(false); binding.textCompatible.setTextColor( - viewModel.isVersionCompatible() - ? ResUtil.getHarmonizedRoles(activity, R.color.green).getAccent() - : ResUtil.getColorAttr(activity, R.attr.colorError) + ResUtil.getColorAttr( + activity, + viewModel.isVersionCompatible() ? R.attr.colorCustomGreen : R.attr.colorError + ) ); binding.linearSettingReloadConfig.setOnClickListener(v -> { diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ShoppingListItemEditFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ShoppingListItemEditFragment.java index 2b979ffcd..2fcb37b3a 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ShoppingListItemEditFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/ShoppingListItemEditFragment.java @@ -174,8 +174,9 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat } } - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); - binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf( + ResUtil.getColorAttr(activity, R.attr.colorCustomBlue) + )); viewModel.getFormData().getQuantityUnitErrorLive().observe( getViewLifecycleOwner(), value -> binding.textQuantityUnit.setTextColor( ResUtil.getColorAttr(activity, value ? R.attr.colorError : R.attr.colorOnSurfaceVariant) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/TransferFragment.java b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/TransferFragment.java index ca19c10b1..c5948471b 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/fragment/TransferFragment.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/fragment/TransferFragment.java @@ -207,13 +207,13 @@ public void onViewCreated(@Nullable View view, @Nullable Bundle savedInstanceSta || viewModel.isProductWillBeFilled()) && viewModel.getFormData().isScannerVisible() ); - ColorRoles roles = ResUtil.getHarmonizedRoles(activity, R.color.blue); + int colorBlue = ResUtil.getColorAttr(activity, R.attr.colorCustomBlue); viewModel.getQuickModeEnabled().observe( getViewLifecycleOwner(), value -> binding.toolbar.setTitleTextColor( - value ? roles.getAccent() : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) + value ? colorBlue : ResUtil.getColorAttr(activity, R.attr.colorOnSurface) ) ); - binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(roles.getAccent())); + binding.textInputAmount.setHelperTextColor(ColorStateList.valueOf(colorBlue)); viewModel.getFormData().getToLocationErrorLive().observe( getViewLifecycleOwner(), value -> binding.textLocationTo.setTextColor( ResUtil.getColorAttr(activity, value ? R.attr.colorError : R.attr.colorOnSurfaceVariant) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/model/Userfield.java b/app/src/main/java/xyz/zedler/patrick/grocy/model/Userfield.java index 74818d213..3a53738c9 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/model/Userfield.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/model/Userfield.java @@ -161,13 +161,16 @@ public static Chip fillChipWithUserfield(Chip chip, Userfield userfield, String if (userfield.getType().equals(Userfield.TYPE_CHECKBOX)) { chip.setText(context.getString(R.string.property_userfield_value_without_space, userfield.getCaption(), "")); - ColorRoles colorGreen = ResUtil.getHarmonizedRoles(context, R.color.green); if (value != null && value.equals("1")) { chip.setCloseIcon( ContextCompat.getDrawable(context, R.drawable.ic_round_check_circle_outline) ); - chip.setCloseIconTint(ColorStateList.valueOf(colorGreen.getOnAccentContainer())); - chip.setChipBackgroundColor(ColorStateList.valueOf(colorGreen.getAccentContainer())); + chip.setCloseIconTint(ColorStateList.valueOf( + ResUtil.getColorAttr(context, R.attr.colorOnCustomGreenContainer) + )); + chip.setChipBackgroundColor(ColorStateList.valueOf( + ResUtil.getColorAttr(context, R.attr.colorCustomGreenContainer) + )); chip.setCloseIconVisible(true); return chip; } else { diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/util/ChipUtil.java b/app/src/main/java/xyz/zedler/patrick/grocy/util/ChipUtil.java index c89fcdbdf..59cb450c2 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/util/ChipUtil.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/util/ChipUtil.java @@ -36,13 +36,15 @@ public class ChipUtil { private final Context context; - private final ColorRoles colorGreen; - private final ColorRoles colorYellow; + private final int colorGreenContainer, colorOnGreenContainer; + private final int colorYellowContainer, colorOnYellowContainer; public ChipUtil(Context context) { this.context = context; - colorGreen = ResUtil.getHarmonizedRoles(context, R.color.green); - colorYellow = ResUtil.getHarmonizedRoles(context, R.color.yellow); + colorGreenContainer = ResUtil.getColorAttr(context, R.attr.colorCustomGreenContainer); + colorOnGreenContainer = ResUtil.getColorAttr(context, R.attr.colorOnCustomGreenContainer); + colorYellowContainer = ResUtil.getColorAttr(context, R.attr.colorCustomYellowContainer); + colorOnYellowContainer = ResUtil.getColorAttr(context, R.attr.colorOnCustomYellowContainer); } private static Chip createChip(Context ctx, String text) { @@ -75,14 +77,12 @@ public Chip createRecipeFulfillmentChip(RecipeFulfillment recipeFulfillment, boo if (recipeFulfillment.isNeedFulfilled()) { textFulfillment = context.getString(R.string.msg_recipes_enough_in_stock); chipFulfillment = createChip(context, context.getString(R.string.property_status_insert)); - chipFulfillment.setTextColor(colorGreen.getOnAccentContainer()); + chipFulfillment.setTextColor(colorOnGreenContainer); chipFulfillment.setCloseIcon( ContextCompat.getDrawable(context, R.drawable.ic_round_check_circle_outline) ); - chipFulfillment.setCloseIconTint(ColorStateList.valueOf(colorGreen.getOnAccentContainer())); - chipFulfillment.setChipBackgroundColor(ColorStateList.valueOf( - colorGreen.getAccentContainer() - )); + chipFulfillment.setCloseIconTint(ColorStateList.valueOf(colorOnGreenContainer)); + chipFulfillment.setChipBackgroundColor(ColorStateList.valueOf(colorGreenContainer)); } else if (recipeFulfillment.isNeedFulfilledWithShoppingList() && showYellow) { textFulfillment = context.getString(R.string.msg_recipes_not_enough) + "\n" + context.getResources() @@ -90,12 +90,12 @@ public Chip createRecipeFulfillmentChip(RecipeFulfillment recipeFulfillment, boo recipeFulfillment.getMissingProductsCount(), recipeFulfillment.getMissingProductsCount()); chipFulfillment = createChip(context, context.getString(R.string.property_status_insert)); - chipFulfillment.setTextColor(colorYellow.getOnAccentContainer()); + chipFulfillment.setTextColor(colorOnYellowContainer); chipFulfillment.setCloseIcon( ContextCompat.getDrawable(context, R.drawable.ic_round_error_outline) ); - chipFulfillment.setCloseIconTint(ColorStateList.valueOf(colorYellow.getOnAccentContainer())); - chipFulfillment.setChipBackgroundColor(ColorStateList.valueOf(colorYellow.getAccentContainer())); + chipFulfillment.setCloseIconTint(ColorStateList.valueOf(colorOnYellowContainer)); + chipFulfillment.setChipBackgroundColor(ColorStateList.valueOf(colorYellowContainer)); } else { textFulfillment = context.getString(R.string.msg_recipes_not_enough) + "\n" + context.getResources() @@ -136,12 +136,12 @@ public Chip createProductFulfillmentChip(boolean needFulfilled) { if (needFulfilled) { textFulfillment = context.getString(R.string.msg_recipes_enough_in_stock); chipFulfillment = createChip(context, context.getString(R.string.property_status_insert)); - chipFulfillment.setTextColor(colorGreen.getOnAccentContainer()); + chipFulfillment.setTextColor(colorOnGreenContainer); chipFulfillment.setCloseIcon( ContextCompat.getDrawable(context, R.drawable.ic_round_check_circle_outline) ); - chipFulfillment.setCloseIconTint(ColorStateList.valueOf(colorGreen.getOnAccentContainer())); - chipFulfillment.setChipBackgroundColor(ColorStateList.valueOf(colorGreen.getAccentContainer())); + chipFulfillment.setCloseIconTint(ColorStateList.valueOf(colorOnGreenContainer)); + chipFulfillment.setChipBackgroundColor(ColorStateList.valueOf(colorGreenContainer)); } else { textFulfillment = context.getString(R.string.msg_recipes_not_enough); int colorOnErrorContainer = ResUtil.getColorAttr(context, R.attr.colorOnErrorContainer); @@ -180,8 +180,8 @@ public Chip createRecipeDueScoreChip(int dueScore) { R.string.subtitle_recipe_due_score, String.valueOf(dueScore) )); - dueScoreChip.setTextColor(colorYellow.getOnAccentContainer()); - dueScoreChip.setChipBackgroundColor(ColorStateList.valueOf(colorYellow.getAccentContainer())); + dueScoreChip.setTextColor(colorOnYellowContainer); + dueScoreChip.setChipBackgroundColor(ColorStateList.valueOf(colorYellowContainer)); } else { dueScoreChip = createChip( context, context.getString(R.string.subtitle_recipe_due_score, String.valueOf(dueScore)) diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/util/UiUtil.java b/app/src/main/java/xyz/zedler/patrick/grocy/util/UiUtil.java index e51231041..514fa73aa 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/util/UiUtil.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/util/UiUtil.java @@ -66,6 +66,8 @@ import androidx.core.view.WindowInsetsCompat.Type; import androidx.interpolator.view.animation.FastOutSlowInInterpolator; import com.google.android.material.bottomappbar.BottomAppBar; +import com.google.android.material.color.ColorContrast; +import com.google.android.material.color.ColorContrastOptions; import com.google.android.material.color.DynamicColors; import com.google.android.material.color.DynamicColorsOptions; import com.google.android.material.color.HarmonizedColorAttributes; @@ -131,13 +133,13 @@ public static void setTheme(Activity activity, SharedPreferences sharedPrefs) { break; default: if (DynamicColors.isDynamicColorAvailable()) { - DynamicColors.applyToActivityIfAvailable( + DynamicColors.applyToActivityIfAvailable(activity); + ColorContrast.applyToActivityIfAvailable( activity, - new DynamicColorsOptions.Builder().setOnAppliedCallback( - activityCallback -> HarmonizedColors.applyToContextIfAvailable( - activity, HarmonizedColorsOptions.createMaterialDefaults() - ) - ).build() + new ColorContrastOptions.Builder() + .setMediumContrastThemeOverlay(R.style.ThemeOverlay_Grocy_MediumContrast) + .setHighContrastThemeOverlay(R.style.ThemeOverlay_Grocy_HighContrast) + .build() ); } else { setContrastTheme( @@ -172,6 +174,32 @@ private static void setContrastTheme( } public static void applyColorHarmonization(Context context) { + int[] attrIds = new int[] { + R.attr.colorError, + R.attr.colorOnError, + R.attr.colorErrorContainer, + R.attr.colorOnErrorContainer, + + R.attr.colorCustomBlue, + R.attr.colorOnCustomBlue, + R.attr.colorCustomBlueContainer, + R.attr.colorOnCustomBlueContainer, + + R.attr.colorCustomGreen, + R.attr.colorOnCustomGreen, + R.attr.colorCustomGreenContainer, + R.attr.colorOnCustomGreenContainer, + + R.attr.colorCustomYellow, + R.attr.colorOnCustomYellow, + R.attr.colorCustomYellowContainer, + R.attr.colorOnCustomYellowContainer, + + R.attr.colorCustomOrange, + R.attr.colorOnCustomOrange, + R.attr.colorCustomOrangeContainer, + R.attr.colorOnCustomOrangeContainer + }; int[] resIds = new int[] { R.color.logo_yellow, R.color.logo_green, @@ -215,7 +243,7 @@ public static void applyColorHarmonization(Context context) { }; HarmonizedColorsOptions options = new HarmonizedColorsOptions.Builder() .setColorResourceIds(resIds) - .setColorAttributes(HarmonizedColorAttributes.createMaterialDefaults()) + .setColorAttributes(HarmonizedColorAttributes.create(attrIds)) .build(); HarmonizedColors.applyToContextIfAvailable(context, options); } diff --git a/app/src/main/java/xyz/zedler/patrick/grocy/view/BezierCurveChart.java b/app/src/main/java/xyz/zedler/patrick/grocy/view/BezierCurveChart.java index 399d5bf1f..efc5a19ac 100644 --- a/app/src/main/java/xyz/zedler/patrick/grocy/view/BezierCurveChart.java +++ b/app/src/main/java/xyz/zedler/patrick/grocy/view/BezierCurveChart.java @@ -85,7 +85,7 @@ public String toString() { private final RectF rectBadge = new RectF(); private final Rect rectMeasure = new Rect(); private final Rect rectDrawing = new Rect(); - private final List curveColors = new ArrayList<>(); + private final int[] colorsAccent, colorsOnAccent, colorsAccentContainer, colorsOnAccentContainer; private ArrayList labels; private HashMap> curveLists; private final HashMap> adjustedCurveLists = new HashMap<>(); @@ -121,11 +121,34 @@ public BezierCurveChart(Context context, AttributeSet attrs) { paintCurve.setStyle(Paint.Style.STROKE); paintCurve.setStrokeWidth(UiUtil.dpToPx(context, 2)); - curveColors.add(ResUtil.getHarmonizedRoles(context, R.color.green)); - curveColors.add(ResUtil.getHarmonizedRoles(context, R.color.yellow)); - curveColors.add(ResUtil.getHarmonizedRoles(context, R.color.orange)); - curveColors.add(ResUtil.getHarmonizedRoles(context, R.color.red)); - curveColors.add(ResUtil.getHarmonizedRoles(context, R.color.blue)); + colorsAccent = new int[] { + ResUtil.getColorAttr(context, R.attr.colorCustomBlue), + ResUtil.getColorAttr(context, R.attr.colorCustomGreen), + ResUtil.getColorAttr(context, R.attr.colorCustomYellow), + ResUtil.getColorAttr(context, R.attr.colorCustomOrange), + ResUtil.getColorAttr(context, R.attr.colorError) + }; + colorsOnAccent = new int[] { + ResUtil.getColorAttr(context, R.attr.colorOnCustomBlue), + ResUtil.getColorAttr(context, R.attr.colorOnCustomGreen), + ResUtil.getColorAttr(context, R.attr.colorOnCustomYellow), + ResUtil.getColorAttr(context, R.attr.colorOnCustomOrange), + ResUtil.getColorAttr(context, R.attr.colorOnError) + }; + colorsAccentContainer = new int[] { + ResUtil.getColorAttr(context, R.attr.colorCustomBlueContainer), + ResUtil.getColorAttr(context, R.attr.colorCustomGreenContainer), + ResUtil.getColorAttr(context, R.attr.colorCustomYellowContainer), + ResUtil.getColorAttr(context, R.attr.colorCustomOrangeContainer), + ResUtil.getColorAttr(context, R.attr.colorErrorContainer) + }; + colorsOnAccentContainer = new int[] { + ResUtil.getColorAttr(context, R.attr.colorOnCustomBlueContainer), + ResUtil.getColorAttr(context, R.attr.colorOnCustomGreenContainer), + ResUtil.getColorAttr(context, R.attr.colorOnCustomYellowContainer), + ResUtil.getColorAttr(context, R.attr.colorOnCustomOrangeContainer), + ResUtil.getColorAttr(context, R.attr.colorOnErrorContainer) + }; paintDot.setStyle(Paint.Style.FILL); paintDot.setAntiAlias(true); @@ -138,9 +161,7 @@ public BezierCurveChart(Context context, AttributeSet attrs) { paintChartBg.setAntiAlias(true); paintGrid.setStyle(Paint.Style.STROKE); - // TODO: use colorOutlineVariant when it's available - paintGrid.setColor(ResUtil.getColorAttr(context, R.attr.colorOutline)); - paintGrid.setAlpha(100); + paintGrid.setColor(ResUtil.getColorAttr(context, R.attr.colorOutlineVariant)); paintGrid.setAntiAlias(true); paintGrid.setStrokeWidth(UiUtil.dpToPx(context, 1)); @@ -368,9 +389,9 @@ private void drawCurvesFill(Canvas canvas) { pathFill.lineTo(curveList.get(0).x, curveList.get(0).y); pathFill.close(); pathFill.op(pathFillMask, Op.INTERSECT); - int curveColor = curveColors.get(colorIndex).getAccentContainer(); + int curveColor = colorsAccentContainer[colorIndex]; colorIndex++; - if (colorIndex > curveColors.size() - 1) { + if (colorIndex > colorsAccentContainer.length - 1) { colorIndex = 0; } paintFill.setColor(curveColor); @@ -403,17 +424,17 @@ private void drawCurvesLine(Canvas canvas) { for (String curveLabel : adjustedCurveLists.keySet()) { ArrayList curveList = adjustedCurveLists.get(curveLabel); assert curveList != null; - int curveColor = curveColors.get(colorIndex).getAccent(); - if (colorIndex > curveColors.size() - 1) { + if (colorIndex > colorsAccent.length - 1) { colorIndex = 0; } + int curveColor = colorsAccent[colorIndex]; buildPath(pathCurve, curveList); paintCurve.setColor(curveColor); canvas.drawPath(pathCurve, paintCurve); drawDots(canvas, curveList, curveColor); - drawBadge(canvas, curveLabel, curveColors.get(colorIndex)); + drawBadge(canvas, curveLabel, colorIndex); colorIndex++; } @@ -426,7 +447,7 @@ private void drawDots(Canvas canvas, ArrayList curveList, int color) { } } - private void drawBadge(Canvas canvas, String text, ColorRoles colorRoles) { + private void drawBadge(Canvas canvas, String text, int colorIndex) { Rect textBounds = new Rect(); paintBadgeText.getTextBounds(text, 0, text.length(), textBounds); textBounds.inset(-badgePadding, 0); @@ -444,9 +465,9 @@ private void drawBadge(Canvas canvas, String text, ColorRoles colorRoles) { float textX = rectBadge.left + badgePadding; float textY = rectBadge.centerY() + textBounds.height() / 2f; - paintBadge.setColor(colorRoles.getAccent()); + paintBadge.setColor(colorsAccent[colorIndex]); canvas.drawRoundRect(rectBadge, cornerRadiusBadge, cornerRadiusBadge, paintBadge); - paintBadgeText.setColor(colorRoles.getOnAccent()); + paintBadgeText.setColor(colorsOnAccent[colorIndex]); canvas.drawText(text, textX, textY, paintBadgeText); } diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 439aa7266..7b85aa3b2 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -19,6 +19,57 @@ + #A3C9FE + #00315B + #1E4876 + #D3E4FF + #B1D18A + #1F3701 + #354E16 + #CDEDA4 + #E1C46D + #3C2F00 + #574500 + #FFE086 + #FFB780 + #4E2600 + #6D3A09 + #FFDCC4 + + #AACDFF + #00172F + #6D93C5 + #000000 + #B5D58E + #0C1A00 + #7D9A59 + #000000 + #E5C871 + #1D1500 + #A88E3D + #000000 + #FFBD8B + #271000 + #C4824C + #000000 + + #FAFAFF + #000000 + #AACDFF + #000000 + #F4FFE0 + #000000 + #B5D58E + #000000 + #FFFAF6 + #000000 + #E5C871 + #000000 + #FFFAF8 + #000000 + #FFBD8B + #000000 + @color/custom_yellow_50 @color/custom_green_50 @color/custom_red_35 diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml deleted file mode 100644 index b6aeaf47e..000000000 --- a/app/src/main/res/values-night/themes.xml +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 3ec7f0f82..af5cf7cdb 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -19,11 +19,25 @@ - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index cd1f8d900..ead0bc853 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -20,11 +20,57 @@ @android:color/transparent - #3a608d - #4c662d - #715c10 - #885122 - #8f4b49 + + #39608F + #FFFFFF + #D3E4FF + #001C38 + #4B662C + #FFFFFF + #CDEDA4 + #102000 + #725C0C + #FFFFFF + #FFE086 + #231B00 + #895120 + #FFFFFF + #FFDCC4 + #2F1400 + + #194471 + #FFFFFF + #5177A7 + #FFFFFF + #314A12 + #FFFFFF + #617D40 + #FFFFFF + #524100 + #FFFFFF + #8A7224 + #FFFFFF + #683605 + #FFFFFF + #A36633 + #FFFFFF + + #002343 + #FFFFFF + #194471 + #FFFFFF + #142700 + #FFFFFF + #314A12 + #FFFFFF + #2B2100 + #FFFFFF + #524100 + #FFFFFF + #391A00 + #FFFFFF + #683605 + #FFFFFF #FDFDF6 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 4d4a8f8ce..7f6d46536 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -18,7 +18,7 @@ ~ Copyright (c) 2020-2023 by Patrick Zedler and Dominic Zedler --> - + + + + \ No newline at end of file