Change toast color XML fonts and background

Belgian Malinois 461 Reputation points
2025-02-08T21:56:59.3633333+00:00

Your help and time are greatly appreciated!

I am trying t change the background to black and fonts to Red. the original is here https://www.imab.dk/windows-10-toast-notification-script/
<?xml version="1.0" encoding="UTF-8"?>

<ToastContent>

    <Visual>

        <Binding Template="ToastGeneric">

            <Text Placement="Attribution" Hint-Style="captionSubtle">

                <![CDATA[<font color="red">Please review the details below before contacting the Service Desk</font>]]>

            </Text>

            <Text>

                <![CDATA[<font color="red">---Windows 11 Upgrade---</font>]]>

            </Text>

            <Text>

                <![CDATA[

                <font color="red">---Windows 11 Upgrade---</font><br/>

                <font color="red">

                In order for your system to be automatically upgraded your system must remain powered on and connected to the MDA network (in the office or at home over VPN) overnight starting at 1800 MT.<br/><br/>

                DO NOT SHUT DOWN YOUR SYSTEM DURING THE UPGRADE PROCESS.<br/><br/>

                After hours please leave your system powered on, plugged into power, with the laptop lid open (or your system may go into hibernation).

                </font>

                ]]>

            </Text>

            <Text>

                <![CDATA[<font color="red">Snooze</font>]]>

            </Text>

        </Binding>

    </Visual>

</ToastContent>

Microsoft Configuration Manager
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,873 questions
{count} votes

Accepted answer
  1. Jan Vinterberg 155 Reputation points
    2025-02-09T21:51:54.6266667+00:00

    I don't believe it is possible to set the colors using "html code" inside the xml.
    Also i believe that the toast environment is using windows native colors, for toast notifications.
    You might be able to change the background using a picture or go with adaptive cards instead.
    Sorry my answer most likely, isn't what you wanted.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.