using cfs_tracker.Helpers; using CommunityToolkit.Mvvm.ComponentModel; namespace cfs_tracker.ViewModels; public partial class AppearanceColorItemViewModel : ObservableObject { public string Key { get; init; } = string.Empty; public string Title { get; init; } = string.Empty; public string Fallback { get; init; } = "#000000"; [ObservableProperty] private string value = string.Empty; [ObservableProperty] private Color previewColor = Colors.Transparent; partial void OnValueChanged(string value) { PreviewColor = ColorUtility.ParseColor(value, Fallback); } }