Skip to content

[cupertino_ui] CupertinoButton.tinted fills with 12% of the accent, not UIKit's 18% #195265

Closed
flutter/packages
#13436

Description

@LahaLuhem

What package does this bug report belong to?

cupertino_ui

What target platforms are you seeing this bug on?

iOS

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
  cupertino_ui:
    dependency: "direct main"
    description:
      name: cupertino_ui
      sha256: a47c4e7c66fd7444a063a602597fceb238f705c3f6b1322bc0053d0a2638ee6e
      url: "https://pub.dev"
    source: hosted
    version: "1.1.4"

Steps to reproduce

  1. In light mode, run the code sample and a UIKit .tinted() button on the same simulator.
  2. Compare the fills.

Expected results

The same fill as UIKit's.

Actual results

Lighter. kCupertinoButtonTintedOpacityLight is 12% (also on main), where UIKit draws about 18%. The docs' gray recipe inherits it. Dark mode matches.

Fill on white cupertino_ui UIKit, iOS 18.5 UIKit, iOS 26.2
Tinted #e0efff, 12% #d1e7ff, 18% #d1eaff, 18%
Gray, tinted(color: systemGrey) per the docs #f1f1f2 #e9e9eb #e9e9eb

Code sample

Code sample
import 'package:cupertino_ui/cupertino_ui.dart';

void main() => runApp(
  CupertinoApp(
    home: CupertinoPageScaffold(
      child: Center(
        child: CupertinoButton.tinted(
          onPressed: () {},
          child: const Text('Save'),
        ),
      ),
    ),
  ),
);
UIKit
var configuration = UIButton.Configuration.tinted()
configuration.title = "Save"
let button = UIButton(configuration: configuration)

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.47.7, on macOS 15.7.9 24G830 darwin-arm64, locale en-US)
    • Framework revision abaf9c5237 (2 weeks ago), 2026-10-08 09:51:21 -0700
    • Engine revision deb287481e
    • Dart version 3.13.5
[!] Xcode - develop for iOS and macOS (Xcode 26.3)

Activity

  1. added
    a: fidelityMatching the OEM platforms better
    p: cupertino_uicupertino_ui package in flutter/packages
    packageflutter/packages repository. See also p: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-designOwned by Design Languages team
    on Oct 26, 2026
  2. mbcorona commented on Oct 26, 2026

    @mbcorona
    Member

    Hi @LahaLuhem, thanks for the report.

    Confirmed: kCupertinoButtonTintedOpacityLight is 0.12 in cupertino_ui (constants.dart). Your PR #13436 moves it to 0.18.

    Routing to team-design.

  3. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    triaged-windowsTriaged by the Windows platform team
    on Oct 27, 2026
  4. flutter-triage-bot commented on Oct 27, 2026

    @flutter-triage-bot

    The triaged-windows label is irrelevant if there is no team-windows label or fyi-windows label.

  5. dkwingsmt commented on Nov 10, 2026

    @dkwingsmt
    Contributor

    @LahaLuhem Thank you for filing the issue and opening the PR. For the record, can you post the rendering results of the widget before and after the PR and the native button for comparison?

  6. LahaLuhem commented on Nov 10, 2026

    @LahaLuhem
    Author

    @dkwingsmt I added the screenshots for both UIKit and SwiftUI (both are still same), and the diffs for this PR

  7. added a commit that references this issue on Nov 11, 2026
    68b3d02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms betterhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions