Add Dark Mode

Add Variables

App OnStart: create a boolean to store Light or Dark mode Set(Dark_Mode, false)
create a variable to store Dark Color for fill Set(Color_Dark_Mode, RGBA(50,86,160,1)
create a variable to store Light Color for fill Set(Color_Light_Mode, Color.White)
create a variable to store Dark Color for Fonts Set(Color_Dark_Font, Color.White)
create a variable to store Light Color for fill Set(Color_Light_Font, RGBA(50,86,160,1)

toggle for dark mode

add a toggle to set dark mode boolean to control light or dark mode
rename to toggle dark mode
Uncheck set (dark mode, true)
on Uncheck Set (dark mode, false)
default dark mode boolean

Set the following parameters
false text dark
true text light
handle fill if (dark mode, color _light mode, color _dark _mode)
color If(dark mode, color _light mode, color _dark _mode)
size 10

set screen background

set screen background to match dark mode
fill if (dark mode, color _dark_mode, color _light_mode)

add color mode to components

Add custom property set the following parameters
display name : color mode
Description dark or light mode
property type: input
data type: Boolean
raise on reset: true

Add components set fill background to match color mode
add custom properties for color dark mode and color light mode to match the power apps colors or set component to dark or light color
set fill to if (component _name.color_mode, color _dark _mode, color _light _mode)
for labels set color and fill were appropriate

EX: class label
for a class label
set Color: if (component _name. color _mode, color _ light _mode, color _purple)
set Fill: if (component _name. color _mode, color _purple, color _ Light _mode)
*color _purple = RGBA(109, 49, 162, 1)