@@ -47,6 +47,7 @@ export class Themer {
4747 appColorScheme : MDCSemanticColorScheme ;
4848 appTypoScheme : MDCTypographyScheme ;
4949 primaryColor : string | Color ;
50+ onPrimaryColor : string | Color ;
5051 secondaryColor : string | Color ;
5152 accentColor : string | Color ;
5253 primaryColorVariant : string | Color ;
@@ -74,11 +75,20 @@ export class Themer {
7475 const color = value instanceof Color ? value : new Color ( value ) ;
7576 colorTheme . primaryColor = color . ios ;
7677 this . appColorScheme . primaryColorVariant = this . appColorScheme . primaryColor . colorWithAlphaComponent ( 0.24 ) ;
77- // colorTheme.primaryColorVariant = new Color(61.2, color.r, color.g, color.b).ios; // default alpha is 0.24
7878 }
7979 getPrimaryColor ( ) : string | Color {
8080 return this . primaryColor ;
8181 }
82+
83+ setOnPrimaryColor ( value ) {
84+ this . onPrimaryColor = value ;
85+ const colorTheme = this . getOrcreateAppColorScheme ( ) ;
86+ const color = value instanceof Color ? value : new Color ( value ) ;
87+ colorTheme . onPrimaryColor = color . ios ;
88+ }
89+ getOnPrimaryColor ( ) {
90+ return this . onPrimaryColor ;
91+ }
8292 setSecondaryColor ( value : string | Color ) {
8393 this . secondaryColor = value ;
8494 const colorTheme = this . getOrcreateAppColorScheme ( ) ;
0 commit comments