Skip to content

Commit 8ac095f

Browse files
Updated onSurfaceVariant color for better contrast ratio in 2025 specs.
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent 4b73066 commit 8ac095f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

material-color-utilities/src/main/java/dynamiccolor/ColorSpec2025.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,10 @@ public DynamicColor onSurfaceVariant() {
471471
}
472472
})
473473
.setContrastCurve(
474-
(s) -> s.platform == PHONE ? getContrastCurve(4.5) : getContrastCurve(7))
474+
(s) ->
475+
s.platform == PHONE
476+
? (s.isDark ? getContrastCurve(6) : getContrastCurve(4.5))
477+
: getContrastCurve(7))
475478
.build();
476479
return super.onSurfaceVariant().toBuilder()
477480
.extendSpecVersion(SpecVersion.SPEC_2025, color2025)

0 commit comments

Comments
 (0)