Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ColorHelper.cs « Xamarin.PropertyEditing.Windows - github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b5aac8b948baa0d0cc2c332697cd980a938f2e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System.Windows.Media;
using Xamarin.PropertyEditing.Drawing;

namespace Xamarin.PropertyEditing.Windows
{
	internal static class ColorHelper
	{
		public static Color ToColor (this CommonColor commonColor)
			=> Color.FromArgb (commonColor.A, commonColor.R, commonColor.G, commonColor.B);

		public static CommonColor ToCommonColor (this Color color)
			=> new CommonColor (color.R, color.G, color.B, color.A);
	}
}