private static DXF.AciColor ToColor(BaseColorViewModel colorViewModel) { return(colorViewModel switch { ArgbColorViewModel argbColor => new DXF.AciColor(argbColor.R, argbColor.G, argbColor.B), _ => throw new NotSupportedException($"The {colorViewModel.GetType()} color type is not supported."), });
public static SKColor ToSKColor(BaseColorViewModel colorViewModel) { return(colorViewModel switch { ArgbColorViewModel argbColor => new SKColor(argbColor.R, argbColor.G, argbColor.B, argbColor.A), _ => throw new NotSupportedException($"The {colorViewModel.GetType()} color type is not supported."), });