You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -749,7 +749,7 @@ export class LightModeTheme implements ColorModeTheme {
749
749
750
750
// For dark content on light background APCA contrast is positive. 60 is “The minimum level recommended for content text that is not body, column, or block text. In other words, text you want people to read.” Failure to reach this contrast level is most likely due to high lightness. Lightness and chroma are set to ones that reach the threshold universally regardless of hue.
751
751
if(this.bg.contrastAPCA(this.seedColor)<=60){
752
-
color.oklch.l=0.45;
752
+
color.oklch.l=0.35;
753
753
754
754
if(this.seedIsAchromatic){
755
755
color.oklch.c=0;
@@ -967,18 +967,19 @@ export class LightModeTheme implements ColorModeTheme {
967
967
968
968
privategetbdAccent(){
969
969
// Accent border color. Lighter and less saturated than accent to put focus on the text label and create nice-looking harmony.
970
-
constcolor=this.seedColor.clone();
970
+
constcolor=this.fgAccent.clone();
971
971
972
972
// For dark content on light background APCA contrast is positive. 15 is “The absolute minimum for any non-text that needs to be discernible and differentiable, but does not apply to semantic non-text such as icons”. In practice, thin borders are perceptually too subtle when using this as a threshould. 25 is used as the required minimum instead. Failure to reach this contrast level is most likely due to high lightness. Lightness and chroma are set to ones that reach the threshold universally regardless of hue.
973
-
if(this.bg.contrastAPCA(this.seedColor)<=25){
974
-
if(this.seedIsAchromatic){
973
+
if(this.bg.contrastAPCA(color)<=25){
974
+
// If seed is achromatic make sure we don't produce parasitic coloring. Our standard achromatic cut-off is set too high for the very light seeds, so using chroma value checks instead.
975
+
if(color.oklch.c<=0.04){
975
976
color.oklch.l=0.55;
976
977
color.oklch.c=0;
977
978
}
978
979
979
-
if(!this.seedIsAchromatic){
980
+
if(color.oklch.c>0.04){
980
981
color.oklch.l=0.55;
981
-
color.oklch.c=0.15;
982
+
color.oklch.c=0.08;
982
983
}
983
984
}
984
985
@@ -989,8 +990,7 @@ export class LightModeTheme implements ColorModeTheme {
989
990
// Slightly subtler version of accent border, used in outlined buttons
990
991
constcolor=this.bdAccent.clone();
991
992
992
-
color.oklch.l+=0.2;
993
-
color.oklch.c-=0.12;
993
+
color.oklch.l+=0.35;
994
994
995
995
returncolor;
996
996
}
@@ -1053,7 +1053,7 @@ export class LightModeTheme implements ColorModeTheme {
1053
1053
// Slightly subtler version of neutral border, used in outlined buttons
0 commit comments