0

I am trying to add new color to my color assets, where the light mode consists of systemBackGroundColor and darkmode consists of a customColor. But when I select systemColor for lightmode instead of getting white Color I am getting black color in color assets. Even after running the app I am getting black color in lightmode.

I tried in XCode beta 6 and beta 7. But the same error is being repeated in simulators and iPhone.screenShot from xCode color assets

1 Answers1

0

You explicitly set a "Light Appearance" in your asset, so the system will use that in light mode. And it also contains the dark color, so what you'll see is dark.

The "Any Appearance" is the fallback used on systems that don't support light and dark mode (i.e., iOS 12 and below).

Frank Rupprecht
  • 9,191
  • 31
  • 56
  • Yeah, but in Light Appearance it should show white right, as white is the default color for systembackGroundColor in light apperance. In dark I set a custom dark color. –  Aug 29 '19 at 09:42
  • As far as I know you can't set system colors in asset catalog colors, so all the three colors you see are hard-coded into the asset. You need to change the Light Appearance manually. – Frank Rupprecht Aug 29 '19 at 10:44