question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Splash background color is wrong

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:24 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
KSemenenkocommented, Oct 5, 2022

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>
  
1reaction
FirewizzNLcommented, Sep 5, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Black iOS launch screen instead of white
The default launch screen color is 'system background color' and it will be black when dark mode is enabled. If you prefer to...
Read more >
LaunchScreen.storyboard not working in Dark Mode
The LaunchScreen is set to use the background color called "appBackground" which is the custom color asset group I made in the assets...
Read more >
Configuring the Launch screen's background color
Configuring the Launch screen's background color You can configure a custom Launch screen when your app is started. This screen is automatically created ......
Read more >
Making launch screens with single color background
Making launch screens with single color background ... In iOS App there is something called a “launch screen” (the screen that appear before...
Read more >
flutter_native_splash | Flutter Package
This package automatically generates iOS, Android, and Web-native code for customizing this native splash screen background color and splash image.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found