using Xamarin.Forms; namespace PRS.Mobile { public class DigitalFormColorSet { public Color Background { get; set; } public Color Foreground { get; set; } public Color Border { get; set; } } public static class DigitalFormUtils { private static DigitalFormColorSet RequiredColors => new() { Background = Color.Orange, Border = Color.Firebrick, Foreground = Color.White, }; private static DigitalFormColorSet DisabledColors => new() { Background = Color.Silver, Border = Color.Gray, Foreground = Color.WhiteSmoke, }; private static DigitalFormColorSet ValueColors => new() { Background = XF.Material.Forms.Material.Color.Surface, Border = XF.Material.Forms.Material.Color.SecondaryVariant, Foreground = XF.Material.Forms.Material.Color.OnSurface, }; private static DigitalFormColorSet SelectorColors => new() { Background = XF.Material.Forms.Material.Color.Secondary, Border = XF.Material.Forms.Material.Color.SecondaryVariant, Foreground = XF.Material.Forms.Material.Color.OnSecondary, }; public static DigitalFormColorSet GetColors(bool disabled, bool required, bool selector) { return disabled ? DisabledColors : required ? RequiredColors : selector ? SelectorColors : ValueColors; } } }