Skip to content

Neumorphic v2.4.0

Choose a tag to compare

@gewill gewill released this 28 Aug 08:16
· 5 commits to master since this release

Additive release. No existing public API changed — swift package diagnose-api-breaking-changes reports no breaking changes against v2.3.0.

Added

  • NeumorphicTheme.resolvedButtonColors(for:) is now public. Apps building their own button modifiers — a fixed-size icon button, for example — can resolve a NeumorphicButtonRole through the same mapping the built-in themed modifier uses, instead of switching over the role themselves. NeumorphicButtonRole is not frozen, so a downstream exhaustive switch would stop compiling if a role is added later; resolving through this method does not.

Documentation

  • The Accessibility article now covers both button roles. The shipped themes clear WCAG AA for each: .surface and .accent are inverse pairs of the same two colors, measuring 5.63:1 on .standard and 14.22:1 on .highContrast. The four-color NeumorphicTheme initializer derives the accent pair from the surface pair, so themes built with it inherit that guarantee.
  • Added guidance for the six-color initializer, whose independent accent pair is easy to get wrong. A saturated fill with white text typically falls below AA — .blue measures 4.02:1, .green 2.22:1, and .orange 2.20:1, against the 4.5:1 threshold.

Full changelog: https://github.com/gewill/neumorphic/blob/master/CHANGELOG.md