Skip to content

Commit

Permalink
feat: Add icons colors to scheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
coire1 committed May 9, 2024
1 parent 7f436db commit f8e4a94
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
<color name="light_on_surface_error_08">#14CC0000</color>
<color name="light_on_surface_error_012">#1FCC0000</color>
<color name="light_on_surface_error_016">#29CC0000</color>
<color name="light_icons_foreground">#212A3D</color>
<color name="light_icons_background">#FFFFFF</color>
<color name="light_icons_disabled">#61212A3D</color>
<color name="light_icons_primary">#123CD3</color>
<color name="light_icons_secondary">#C014EB</color>
<color name="light_icons_success">#218230</color>
<color name="light_icons_warning">#E76309</color>
<color name="light_icons_error">#CC0000</color>
<color name="dark_text_primary">#FFFFFF</color>
<color name="dark_text_on_primary">#E6E9F0</color>
<color name="dark_text_on_primary_container">#0C288D</color>
Expand Down Expand Up @@ -78,4 +86,12 @@
<color name="dark_on_surface_error_08">#1FFFC2C2</color>
<color name="dark_on_surface_error_012">#1FCC0000</color>
<color name="dark_on_surface_error_016">#29CC0000</color>
<color name="dark_icons_foreground">#F2F4F8</color>
<color name="dark_icons_background">#212A3D</color>
<color name="dark_icons_disabled">#61BFC8D9</color>
<color name="dark_icons_primary">#728EF3</color>
<color name="dark_icons_secondary">#DF8AF5</color>
<color name="dark_icons_success">#85E093</color>
<color name="dark_icons_warning">#FAB484</color>
<color name="dark_icons_error">#FF9999</color>
</resources>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ const ExtendedColorScheme lightExtendedColorScheme = ExtendedColorScheme(
onSurfaceError08: VoicesColors.lightOnSurfaceError08,
onSurfaceError012: VoicesColors.lightOnSurfaceError012,
onSurfaceError016: VoicesColors.lightOnSurfaceError016,
iconsForeground: VoicesColors.lightIconsForeground,
iconsBackground: VoicesColors.lightIconsBackground,
iconsDisabled: VoicesColors.lightIconsDisabled,
iconsPrimary: VoicesColors.lightIconsPrimary,
iconsSecondary: VoicesColors.lightIconsSecondary,
iconsSuccess: VoicesColors.lightIconsSuccess,
iconsWarning: VoicesColors.lightIconsWarning,
iconsError: VoicesColors.lightIconsError,
);

const ColorScheme darkColorScheme = ColorScheme.dark(
Expand Down Expand Up @@ -200,6 +208,14 @@ const ExtendedColorScheme darkExtendedColorScheme = ExtendedColorScheme(
onSurfaceError08: VoicesColors.darkOnSurfaceError08,
onSurfaceError012: VoicesColors.darkOnSurfaceError012,
onSurfaceError016: VoicesColors.darkOnSurfaceError016,
iconsForeground: VoicesColors.darkIconsForeground,
iconsBackground: VoicesColors.darkIconsBackground,
iconsDisabled: VoicesColors.darkIconsDisabled,
iconsPrimary: VoicesColors.darkIconsPrimary,
iconsSecondary: VoicesColors.darkIconsSecondary,
iconsSuccess: VoicesColors.darkIconsSuccess,
iconsWarning: VoicesColors.darkIconsWarning,
iconsError: VoicesColors.darkIconsError,
);

/// [ThemeData] for the `catalyst` brand.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ class ExtendedColorScheme extends ThemeExtension<ExtendedColorScheme> {
required this.onSurfaceError08,
required this.onSurfaceError012,
required this.onSurfaceError016,
required this.iconsForeground,
required this.iconsBackground,
required this.iconsDisabled,
required this.iconsPrimary,
required this.iconsSecondary,
required this.iconsSuccess,
required this.iconsWarning,
required this.iconsError,
});

final Color? textPrimary;
Expand Down Expand Up @@ -55,6 +63,14 @@ class ExtendedColorScheme extends ThemeExtension<ExtendedColorScheme> {
final Color? onSurfaceError08;
final Color? onSurfaceError012;
final Color? onSurfaceError016;
final Color? iconsForeground;
final Color? iconsBackground;
final Color? iconsDisabled;
final Color? iconsPrimary;
final Color? iconsSecondary;
final Color? iconsSuccess;
final Color? iconsWarning;
final Color? iconsError;

@override
ThemeExtension<ExtendedColorScheme> copyWith({
Expand Down Expand Up @@ -83,6 +99,14 @@ class ExtendedColorScheme extends ThemeExtension<ExtendedColorScheme> {
Color? onSurfaceError08,
Color? onSurfaceError012,
Color? onSurfaceError016,
Color? iconsForeground,
Color? iconsBackground,
Color? iconsDisabled,
Color? iconsPrimary,
Color? iconsSecondary,
Color? iconsSuccess,
Color? iconsWarning,
Color? iconsError,
}) {
return ExtendedColorScheme(
textPrimary: textPrimary ?? this.textPrimary,
Expand Down Expand Up @@ -114,6 +138,14 @@ class ExtendedColorScheme extends ThemeExtension<ExtendedColorScheme> {
onSurfaceError08: onSurfaceError08 ?? this.onSurfaceError08,
onSurfaceError012: onSurfaceError012 ?? this.onSurfaceError012,
onSurfaceError016: onSurfaceError016 ?? this.onSurfaceError016,
iconsForeground: iconsForeground ?? this.iconsForeground,
iconsBackground: iconsBackground ?? this.iconsBackground,
iconsDisabled: iconsDisabled ?? this.iconsDisabled,
iconsPrimary: iconsPrimary ?? this.iconsPrimary,
iconsSecondary: iconsSecondary ?? this.iconsSecondary,
iconsSuccess: iconsSuccess ?? this.iconsSuccess,
iconsWarning: iconsWarning ?? this.iconsWarning,
iconsError: iconsError ?? this.iconsError,
);
}

Expand All @@ -128,34 +160,34 @@ class ExtendedColorScheme extends ThemeExtension<ExtendedColorScheme> {
return ExtendedColorScheme(
textPrimary: Color.lerp(textPrimary, other.textPrimary, t),
textOnPrimary: Color.lerp(textOnPrimary, other.textOnPrimary, t),
textOnPrimaryContainer:
Color.lerp(textOnPrimaryContainer, other.textOnPrimaryContainer, t),
textOnPrimaryContainer:
Color.lerp(textOnPrimaryContainer, other.textOnPrimaryContainer, t),
textDisabled: Color.lerp(textDisabled, other.textDisabled, t),
success: Color.lerp(success, other.success, t),
onSuccess: Color.lerp(onSuccess, other.onSuccess, t),
successContainer: Color.lerp(successContainer, other.successContainer, t),
onSuccessContainer:
Color.lerp(onSuccessContainer, other.onSuccessContainer, t),
Color.lerp(onSuccessContainer, other.onSuccessContainer, t),
warning: Color.lerp(warning, other.warning, t),
onWarning: Color.lerp(onWarning, other.onWarning, t),
warningContainer: Color.lerp(warningContainer, other.warningContainer, t),
onWarningContainer:
Color.lerp(onWarningContainer, other.onWarningContainer, t),
onSurfaceNeutral08:
Color.lerp(onSurfaceNeutral08, other.onSurfaceNeutral08, t),
Color.lerp(onWarningContainer, other.onWarningContainer, t),
onSurfaceNeutral08:
Color.lerp(onSurfaceNeutral08, other.onSurfaceNeutral08, t),
onSurfaceNeutral012:
Color.lerp(onSurfaceNeutral012, other.onSurfaceNeutral012, t),
Color.lerp(onSurfaceNeutral012, other.onSurfaceNeutral012, t),
onSurfaceNeutral016:
Color.lerp(onSurfaceNeutral016, other.onSurfaceNeutral016, t),
Color.lerp(onSurfaceNeutral016, other.onSurfaceNeutral016, t),
onSurfacePrimaryContainer: Color.lerp(
onSurfacePrimaryContainer,
other.onSurfacePrimaryContainer,
t,
),
onSurfacePrimary08:
Color.lerp(onSurfacePrimary08, other.onSurfacePrimary08, t),
onSurfacePrimary012:
Color.lerp(onSurfacePrimary012, other.onSurfacePrimary012, t),
onSurfacePrimary08:
Color.lerp(onSurfacePrimary08, other.onSurfacePrimary08, t),
onSurfacePrimary012:
Color.lerp(onSurfacePrimary012, other.onSurfacePrimary012, t),
onSurfacePrimary016:
Color.lerp(onSurfacePrimary016, other.onSurfacePrimary016, t),
onSurfaceSecondary08:
Expand All @@ -169,6 +201,14 @@ class ExtendedColorScheme extends ThemeExtension<ExtendedColorScheme> {
Color.lerp(onSurfaceError012, other.onSurfaceError012, t),
onSurfaceError016:
Color.lerp(onSurfaceError016, other.onSurfaceError016, t),
iconsForeground: Color.lerp(iconsForeground, other.iconsForeground, t),
iconsBackground: Color.lerp(iconsBackground, other.iconsBackground, t),
iconsDisabled: Color.lerp(iconsDisabled, other.iconsDisabled, t),
iconsPrimary: Color.lerp(iconsPrimary, other.iconsPrimary, t),
iconsSecondary: Color.lerp(iconsSecondary, other.iconsSecondary, t),
iconsSuccess: Color.lerp(iconsSuccess, other.iconsSuccess, t),
iconsWarning: Color.lerp(iconsWarning, other.iconsWarning, t),
iconsError: Color.lerp(iconsError, other.iconsError, t),
);
}
}
Expand Down

0 comments on commit f8e4a94

Please sign in to comment.