Skip to content

[#1370] Add oudsTintColor view modifier API#1372

Merged
ludovic35 merged 4 commits intodevelopfrom
copilot/add-tint-color-api
Mar 30, 2026
Merged

[#1370] Add oudsTintColor view modifier API#1372
ludovic35 merged 4 commits intodevelopfrom
copilot/add-tint-color-api

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

Related issues

#1370

Description

Adds oudsTintColor(_:) to the View extension in View+Color.swift, aligning OUDS with SwiftUI's modern .tint() API (as .accentColor() is deprecated).

  • View+Color.swift: New public oudsTintColor(_ color: MultipleColorSemanticToken) method + private ColorSchemeBasedTintColor: ViewModifier that resolves the token against the current colorScheme and applies .tint()
  • _OUDSComponents.md: Added oudsTintColor to the "Apply specific colors" usage examples
  • AGENTS.md: Updated color helpers section to mention oudsTintColor
  • CHANGELOG.md: Added entry under [Unreleased]

Usage:

someView.oudsTintColor(theme.colors.actionEnabled)

Follows the exact same pattern as oudsAccentColor, oudsForegroundColor, oudsBackground, etc.

LLM used: Claude Sonnet 4.5

Motivation & Context

SwiftUI's .accentColor() is deprecated in favor of .tint(). OUDS already wrapped the other color-application APIs (foregroundColor, background, accentColor) but was missing a tint color helper that handles light/dark token resolution.

Types of change

  • New feature (non-breaking change which adds functionality)

Previews

  • (NA)

Checklist

Contribution

Accessibility

  • (NA)

Design

  • (NA)

Development

  • My change follows the developer guide
  • I checked my changes do not add new SwiftLint warnings
  • (NA) I have added unit tests to cover my changes (optional)

Documentation

  • My change introduces changes to the documentation and/or I have updated the documentation accordingly

Checklist (for Core Team only)

  • The evolution have been tested and the project builds for iPhones and iPads
  • Code review has been done by reviewers according to CODEOWNERS file
  • (NA) Design review has been done
  • (NA) Accessibility review has been done
  • (NA) Q/A team has tested the evolution
  • Documentation has been updated if relevant
  • Internal files have been updated if relevant (like CONTRIBUTING, DEVELOP, THIRD_PARTY, CONTRIBUTORS, NOTICE)
  • CHANGELOG has been updated respecting keep a changelog rules and reference the issues
  • (NA) The wiki has been updated if needed (optional)

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI linked an issue Mar 27, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add tint color API to library Add oudsTintColor view modifier API Mar 27, 2026
Copilot AI requested a review from pylapp March 27, 2026 17:06
Copy link
Copy Markdown
Member

@pylapp pylapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pylapp pylapp marked this pull request as ready for review March 27, 2026 17:49
@pylapp pylapp requested a review from ludovic35 as a code owner March 27, 2026 17:49
@pylapp pylapp changed the title Add oudsTintColor view modifier API [#1365] Add oudsTintColor view modifier API Mar 30, 2026
@pylapp pylapp changed the title [#1365] Add oudsTintColor view modifier API [#1370] Add oudsTintColor view modifier API Mar 30, 2026
Copilot AI and others added 4 commits March 30, 2026 21:37
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
@ludovic35 ludovic35 force-pushed the copilot/add-tint-color-api branch from 2ba6413 to 3edd4d4 Compare March 30, 2026 19:39
@ludovic35 ludovic35 merged commit 1f56960 into develop Mar 30, 2026
17 checks passed
@ludovic35 ludovic35 deleted the copilot/add-tint-color-api branch March 30, 2026 19:44
pylapp added a commit that referenced this pull request Mar 31, 2026
Closes #1370

Assisted-by: Claude Sonnet 4.6 (GitHub Copilot)
Reviewed-by: Ludovic Pinel <ludovic.pinel@orange.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
Signed-off-by: Ludovic Pinel <ludovic.pinel@orange.com>
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
pylapp added a commit that referenced this pull request Mar 31, 2026
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
Signed-off-by: Ludovic PINEL <ludovic.pinel@orange.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pylapp <7559007+pylapp@users.noreply.github.com>
Co-authored-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
Co-authored-by: Ludovic PINEL <ludovic.pinel@orange.com>
pylapp added a commit that referenced this pull request Mar 31, 2026
Closes #1370

Suggested-by: François Suc <francois.suc@orange.com>
Assisted-by: Claude Sonnet 4.6 (GitHub Copilot)
Reviewed-by: Ludovic Pinel <ludovic.pinel@orange.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
Signed-off-by: Ludovic Pinel <ludovic.pinel@orange.com>
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In library, provide an OUDS tint color API

3 participants