maui: iOS Splash background color is wrong

Description

I’m not sure if this only shows up on certain displays, but the generated RGB that ends up in the MauiSplash.Storyboard doesn’t match the hex value provided in the csproj.

From csproj:

<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

From MauiSplash.Storyboard:

<color key="backgroundColor" red="0.31764707" green="0.16862746" blue="0.83137256" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>

Color picking in Photoshop this is #5729dd which is not #512BD4 and at least on my display is obviously wrong.

Simulator Screen Shot - iPhone 13 Pro - 2022-08-13 at 12 37 56

Steps to Reproduce

File > New and run on iPhone 13 Pro sim. My display settings:

image

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

15

Did you find any workaround?

No response

Relevant log output

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 24 (18 by maintainers)

Most upvoted comments

Won’t this then be broken on Android as you are explicitly using two different colours as this issue is iOS only?

you can do like this

<ItemGroup Condition="$(TargetFramework.Contains('-ios'))">
      <!-- App Icon -->
      <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\ios.svg" Color="#ED2C65" />
  </ItemGroup>

  <ItemGroup Condition="$(TargetFramework.Contains('-android'))">
      <!-- App Icon -->
      <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\android.svg" Color="#ED2C65" />
  </ItemGroup>
  

I have got the same issue, I use a svg image with transparent background, but it still generates another color: image image image