Repository navigation
Add Display P3 wide gamut colors profile to Flutter (a.k.a. enable 25% more colors in Flutter) #55092
Description
Activity
@brianosman I guess, you know more about this topic. Can you shed some light on it? Thanks, Brian.
- addedengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.c: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutter
on Apr 20, 2020 @tomasbaran @brianegan do you have plan on adding Display P3 to Flutter?
Reacted by Tomas Baran, Serena Lambert, Jabed Amin, Dmitrii Tikhonov, Elysium-Planitia, Vladimir Golskiy and fiercepark@fredlee12345678 I hope @brianegan will be able to tell us more about this topic or even better I hope he or someone else will be able to implement this feature.
I just need that feature in my apps but since I'm just starting with app development—I'm not qualified for implementing it in Flutter.
But looking at Apple instructions (https://developer.apple.com/videos/play/wwdc2017/821/) it may not be that difficult to implement:
Hey all -- I seem to have been tagged on this one, but I think I'm the wrong person ^^
Reacted by Tomas BaranIt seems none follow this issue?
Reacted by Priit Kallas, MIKE, Vladimir Golskiy and Starfelll- addedP3Issues that are less important to the Flutter projectIssues that are less important to the Flutter project
on Dec 10, 2020 - addedplatform-androidAndroid applications specificallyAndroid applications specificallyplatform-iosiOS applications specificallyiOS applications specificallya: fidelityMatching the OEM platforms betterMatching the OEM platforms betterP2Important issues not at the top of the work listImportant issues not at the top of the work listand removedP3Issues that are less important to the Flutter projectIssues that are less important to the Flutter project
on Aug 5, 2021 46 remaining items
However, I did do some research above to convince the team that we aren't painting ourselves into the proverbial corner with respect to Android.
I should hope so, I'm actually using Flutter because it's much better on Android than React Native (which is completely unusable). Other developers seem to love the other platforms because they focus on iOS, but as for me I see Flutter's usability on Android as a trump card. Don't drop the ball on Android!
- added a commit that references this issue
on May 12, 2023 flutter/engine#39111 behind the
FLTEnableWideGamutInfo.plist value on iOS only is available in Flutter 3.8.0-12.0.preThis is now in the beta channel.

We have a great p3 colour space in flutter 3.10, a great milestone, but Color(0xff${hex}) is currently displayed incorrectly.@fiercepark can you file an issue if you've identified a bug, please.
Reacted by fiercepark@jmagman We've upgraded an app to Flutter 3.10.1. And enabled FLTEnableWideGamut in info.plist as recommended in the flutter announcement (also tried with FLTEnableImpeller flag although that should be default in this flutter version - still no luck). On running the app the colours don't appear any differently? Is there something else I need to do in order to enable the feature? Or a certain Flutter method that replaces Color.fromRGB0(0, 209, 169,1)?
@jabedamin wide gamut colors are only displayed if you have wide gamut images or are using gradients. Please file an issue with a screenshot if you expect wide gamut colors and aren't seeing it.
@gaaclarke I see, I was hoping flutter objects would also support wide gamut colours in addition to images. For example Button color or Container(color: Colors.blueAccent), is that not supported? If not, any plans to support in the future? It's these colours that are sometimes more visibly dull than images.
Reacted by Asham Sabir and Elysium-Planitia@jabedamin we're never going to change the existing code to mean something different. We might add new colors in the future, something like
Container(color: Color.displayP3(0.0, 0.0, 1.0, 1.0)).Reacted by Jabed Amin@gaaclarke yes that would help hugely. I suspect many others are interested in this too, in order for Flutter UIs to level up to native apps on Swift.
This might be my lack of understanding on how the code behind the scenes renders colours in Flutter. I was thinking more in the sense of displaying colours based on available colour spaces on any given device. So when designing an app, if the designer uses for example RGB(0, 209, 169) on an object - this RGB code would not not change, but it would be displayed differently depending on the device and supported colour space.
Reacted by HPanda, Tobias Marschall, JT and Tomas Baran@gaaclarke and @jabedamin yeah this almost feels like a "gotcha" moment that was too good to be true. of course i appreciate the p3 support for images, i fought for it! i assumed from the title "Add Display P3 wide gamut colors profile to Flutter (a.k.a. enable 25% more colors in Flutter)" it would be 25% more colors across the entire app ui. seems a shame to have vibrant images and still a flat dull UI if it's capable.
the end user is the customer and the customer likes the bright shiny silky smooth end product. what can we do to push up the priority on this?
thanksReacted by HPanda, Vishnu Mohandas, Elysium-Planitia, El, Josh Matthews, Bartosz Rudnik, Jabed Amin, Guilherme Brisida, Tomas Baran and Tobias MarschallReacted by volskaya, Elysium-Planitia and Jabed AminReacted by HPanda, Elysium-Planitia, Miguel Oliveira and Jabed AminOkay, here's what we are going to do. This issue is very broad and I believe that the majority of what it represents has now been fulfilled on
main. Namely:- iOS Display P3 support
- Display wide gamut images correctly
- Take advantage of higher bits/pixel for gradients
All of that is on
mainand on by default now. So, I'm going to close this issue and open more specific issues that represent any remaining potential work that's been discussed here so people can discuss them / upvote them:- Add support for Android -- [Impeller] Implement Wide Gamut colors for Vulkan #127852
- Add support for the Framework -- Implement wide gamut color support in the Framework #127855
If there is anything else I missed, please file an issue (including if you have found a bug in wide gamut image support).
Reacted by Tomas Baran, HPanda, Armando Jimenez, Tobias Marschall, pierre and Jabed Aminthank you!
for those who aren't following this closely, is it ok to post this in reddit r/flutterdev to inform people? just as i thought it was a huge win, i don't think the community there knows that it's only for wide gamut images.
is it ok to notify them ell them where to go to and discuss / upvote it if they find it important to them to include in the framework?
i don't want to get dinged for "farming" upvotes like someone warned about
Reacted by Jabed AminThis thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Jun 14, 2023

Use case
25% more colors
First off, my app is full of imagery. iPhones (since iPhone 7), iPads, Macs and Android devices have been using Display P3 wide gamut for some years now. It's kinda last century to give users the old sRGB colors, when their phones support the wider P3 gamut that provides 25% larger color space. Important especially for images.
Color discrepancy btw iOS and Android
Second, I'm not sure it's related to the same issue but there is a discrepancy between colors on Android and iOS when running from the same Flutter codebase. More here: #39113
Flutter shall achieve the same quality as the native code
Third, when writing a native iOS app, you can choose which Color Profile you want to write the app in (sRGB/P3). So, when choosing to write a Flutter app (instead of a native one), you are limited and won't achieve the same results. We want to achieve the same in Flutter as in native!
Proposal
Please, add an option to choose which color Profile we want to write Flutter apps, so they truly are beautiful as they are meant be. It is one of the Flutter pillars, right?
More info by Apple, Google