Skip to content

Commit 855d999

Browse files
Merge pull request #712 from nextcloud/style/noid/2025spec#
Updated onSurfaceVariant color for better contrast ratio in 2025 specs.
2 parents 5c502d9 + 8ac095f commit 855d999

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)