Create a Color Palette struct/enum that returns the color based on the type provided. The Type should take the current theme of user device into consideration.
Proposed Solution
Create a struct/enum name ColorPalette inside utils and define the colors for
Primary -
Light Theme - #6237FF | Dark Theme - #6971D3
Secondary-
Light Theme - #F86C28 | Dark Theme - #FFBA8F
Accent -
Light Theme - #1FB9FC | Dark Theme - #50C7F3
Warning -
Light Theme - #F7456D | Dark Theme - #D79AB8
Background -
Light Theme - #ffffff | Dark Theme - 000000
Make sure that you take the device's theme in consideration, so you'll need to check the value of the ColorScheme variable.
Alternate Solution
You can also define named colors in the Assets folder, give Light and Dark appearance and then wrap it in an enum or struct.
Requirement
Create a Color Palette struct/enum that returns the color based on the type provided. The Type should take the current theme of user device into consideration.
Proposed Solution
Create a struct/enum name ColorPalette inside utils and define the colors for
Primary -
Secondary-
Accent -
Warning -
Background -
Make sure that you take the device's theme in consideration, so you'll need to check the value of the ColorScheme variable.
Alternate Solution
You can also define named colors in the Assets folder, give Light and Dark appearance and then wrap it in an enum or struct.