Skip to content

Commit

Permalink
Add the Ristreto color to the palette (#5379)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Jun 15, 2024
1 parent 621184c commit 9f7d9d4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/smooth_app/lib/themes/smooth_theme_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
class SmoothColorsThemeExtension
extends ThemeExtension<SmoothColorsThemeExtension> {
SmoothColorsThemeExtension({
required this.primaryUltraBlack,
required this.primaryBlack,
required this.primaryDark,
required this.primarySemiDark,
Expand All @@ -19,7 +20,8 @@ class SmoothColorsThemeExtension
});

SmoothColorsThemeExtension.defaultValues()
: primaryBlack = const Color(0xFF341100),
: primaryUltraBlack = const Color(0xFF52443D),
primaryBlack = const Color(0xFF341100),
primaryDark = const Color(0xFF483527),
primarySemiDark = const Color(0xFF52443D),
primaryNormal = const Color(0xFFA08D84),
Expand All @@ -33,11 +35,19 @@ class SmoothColorsThemeExtension
greyDark = const Color(0xFF666666),
greyLight = const Color(0xFF8F8F8F);

// Ristreto
final Color primaryUltraBlack;
// Chocolate
final Color primaryBlack;
// Cortado
final Color primaryDark;
// Mocha
final Color primarySemiDark;
// Macchiato
final Color primaryNormal;
// Cappuccino
final Color primaryMedium;
// Latte
final Color primaryLight;
final Color secondaryNormal;
final Color secondaryLight;
Expand All @@ -49,6 +59,7 @@ class SmoothColorsThemeExtension

@override
ThemeExtension<SmoothColorsThemeExtension> copyWith({
Color? primaryUltraBlack,
Color? primaryBlack,
Color? primaryDark,
Color? primarySemiDark,
Expand All @@ -64,6 +75,7 @@ class SmoothColorsThemeExtension
Color? greyLight,
}) {
return SmoothColorsThemeExtension(
primaryUltraBlack: primaryUltraBlack ?? this.primaryUltraBlack,
primaryBlack: primaryBlack ?? this.primaryBlack,
primaryDark: primaryDark ?? this.primaryDark,
primarySemiDark: primarySemiDark ?? this.primarySemiDark,
Expand All @@ -90,6 +102,11 @@ class SmoothColorsThemeExtension
}

return SmoothColorsThemeExtension(
primaryUltraBlack: Color.lerp(
primaryUltraBlack,
other.primaryUltraBlack,
t,
)!,
primaryBlack: Color.lerp(
primaryBlack,
other.primaryBlack,
Expand Down

0 comments on commit 9f7d9d4

Please sign in to comment.