How do you set the svg foreground color in .NET Maui splash screen - svg

I know when setting the color for a FontImageSource you can use things like:
Color="#512BD4"
to change the color of the icon, but how do you apply the same logic to the splash screen setting as this:
<MauiSplashScreen Include="Resources\Splash\popup_splash.svg" Color="#512BD4" BaseSize="256,256" />
only seems to set the background color of the screen. The icon defaults to black and there aren't any hints in the designer.

You can try to set the TintColor attribute to your MauiSplashScreen like below:
<MauiSplashScreen Include="Resources\Splash\popup_splash.svg" TintColor="#512BD4"/>

Use an image editor that can edit .svg files, to set the color of the foreground shape(s).
[OPINION] IMHO, there is no option to "set foreground color" because there can be MULTIPLE colors in an .svg.
Also, for cross-platform compatibility, Maui converts the .svg into a .png, when building the app for each platform. That is what gets displayed on the device. This conversion is done without any knowledge of that XAML (that later displays the splash screen image on top of the colored background).
Because Maui runs on multiple platforms, expect to see functionality that is easy to implement on all the platforms, and is in high demand by app developers. [OPINION] Being able to dynamically "colorize" a splash screen while the app starts up is not likely to be a high priority "wish" for many app developers.
The "background color" is different, because that simply fills in behind any transparent areas of the image. Easily done on all platforms that Maui targets.

Related

Change Xamarin form ios launch screen image

I am working on Xamarin form cross platform app where I need to change default launch screen image.
I changed launch screen images from Asset catalog then lunch screen but when app is launched image is showing small and centered with background of default xamarin background color.
How do i change that too ?
Did you check LaunchScreen.storyboard file?
https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/launch-screens/
Maybe you need to check your image dimensions and change the background color of the launch screen in the Resources/LaunchScreen.storyboard file (Color tag).
If you need your launch screen background color white:
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
If you need your launch screen background color black:
<color key="backgroundColor" red="0" green="0" blue="0" alpha="1" colorSpace="calibratedRGB"/>

Tile/live tile change color when windows change theme UWP

In my UWP application in tile I set black color of background, and icon has transperent background, it's look very well. But then i change theme in windows 10(desktop) to white and my tile change background color to white. Why is it happend, when i set color - black in manifest of application. Like in this application.
Best regards, Dmitry
I can't add a comment but if you mean the high contrast setting I do not believe this is possible since the tile settings cannot be changed at runtime and there is no other way to set the color outside of the apps manifest. You can create override the styles for other controls but not for the tiles properties.
"Note It’s possible to override the system color resources for high-contrast color and accent color by creating resources with the same names, but it’s a best practice to respect the user’s color choices, especially for high-contrast settings. Xaml Theme Resources
More on high contrast themes here: High Contrast Themes - MSDN
I would instead try setting the image background to not be transparent and take up the whole space of the tile. You won't be able to change it but it appears you want it always black anyways. I am not certain this will work in your scenario though since you are using a live tile and not just an image.
You may also want to look at using a secondary tile: Theme Resources

Transparent icon in start menu for universal app

I'm developing a universal app. I have a list of icons in the manifest. The icon on the taskbar is fine, transparency works.
The start menu icon doesn't have transparent edges.
No edges.
The list of icons that I have.
How would I make the edges transparent? Should I add any other icons?
This is by design as the background (behind the tile itself) may be colored quite differently. In the start menu, there's a dark background whereas there's a white background in the Cortana search. Maybe try sending MS your wishes via the feedback app :)
Seems like that it's by design, as you can see, default Windows Apps behave the same too, even those which use transparent color for their logo (like Calculator, Mail, etc).
However, If you set background color of logo and tile to "transparent" (in app manifest) your app icon may get displayed in start menu with transparent background in some circumstances like when Windows is in hight contrast theme.

Splash screen in Windows Store apps

I am developing Windows Store Apps for Tablet using VS2012. Right now i am creating splash screen for my application. My requirement is the splash screen should be display full screen in my app.
but it is working as Center of the screen. Can any one help regarding this...
The answer is that there is no way to create an official splash screen that is full-screen. A splash screen has to use a 620 x 300 pixel image, where it is a normal splash screen or an extended splash screen. However, you can match the background color around the splash screen to the color of the splash screen image (using the instructions you already found), which makes it appear like a full-screen image, even though much of it is just color.
AFAIK a splash screen has to be centered, but maybe a valid work around would be to create a start page (regular xaml) and have this one displayed as initial screen as soon as the splash screen is gone.
But this would mean that your startup time has to be quite fast.
Maybe it's an option for you.
Open the "package.appxmanifest" manifest file.
The manifest should automatically open in the Microsoft Visual Studio Express 2012 for Windows 8 Manifest Designer.
Open the Application UI tab and scroll down to the Splash Screen
section. If you are still using project defaults, you should see the
"images\splashscreen.png" path in the Splash Screen field. If you
open "package.appxmanifest" in a text editor, you should see
SplashScreen element as a child of the VisualElements element. For
example, the default splash screen markup in the manifest file looks
like this:
XML
{ <SplashScreen Image="images\splashscreen.png" /> }
Change the splash screen image by using the Browse... button and
confirm that the image was added to your Visual Studio project.
Important The splash screen image you choose must be 620 x 300
pixels using a 1x scaling factor.
In the Background Color field of the Splash Screen section, set the
background color to display with your splash screen image. You can
enter either the name of a color or '#' and the hex value of a color.
Setting a background color for your splash screen is optional. If you
do not specify a color, the splash screen background color defaults
to the Tile background color (the color in the Background Color field
of the Tile section in the Application UI tab). If you open
package.appxmanifest in a text editor, the Tile background color is
specified via the BackgroundColor attribute of the VisualElements
element.
my workaround is make a 620x300 splash .png image with alpha background, so its not a full 620x300 image. the image itself is just a 300x300 logo. my suggestion is just make a small center image (your app logo or something else) and make it blend to the background (gradient or alpha)

Web Colors - Light Grays on PC not showing

I could be completely off but just wanted to see if there was anything on this subject:
I'm developing a site at the moment that includes a few DIVs that use different shades of really light greys for background and border colors. On both my Mac (laptop and desktop) the colors can be seen quite easily. However, on PC (both Firefox and IE) the colors are not there at all.
The current colors I have are #E9E9E9 and #E1E1E1.
The weird thing is when I change the colors to something darker like #CCCCCC the color is easily seen on PCs and I would assume I could put up a few more shades lighter. But when I move it to the next color like #DDDDDD the color is completely gone.
Just on a limb but is there any weird thing like PC's not rendering certain color codes or am I just trying to make something out of nothing here?
I've been in the exact situation and I had a hard time designing UIs because of this issue.
I'm on Ubuntu 18.04 and Chrome, either of which is not the problem.
This issue resides in the monitor settings, in my case I'm using a Samsung Monitor.
I've solved my issue by doing the following:
Reveal your Monitor Settings (via some button in your monitor).
Navigate to Menu, and then go to Picture.
Scroll down to reveal the other settings down below.
Set HDMI Black Level to Normal
Instantaneously you'll see your black colors improved.
There shouldn't be any problem with a PC displaying those colors. It could be a problem with your PC's video settings or your monitor. Have you tried it with multiple PCs and monitors?

Resources