Skip to content

Instantly share code, notes, and snippets.

@peterfoot
Created February 4, 2016 11:27
Show Gist options
  • Save peterfoot/be89d5b3c5ac4cc16ae1 to your computer and use it in GitHub Desktop.
Save peterfoot/be89d5b3c5ac4cc16ae1 to your computer and use it in GitHub Desktop.
using System;
namespace Xamarin.Forms.Platform.WinRT
{
public static class ColorExtensions
{
public static Windows.UI.Color ToWindows(this Xamarin.Forms.Color color)
{
return Windows.UI.Color.FromArgb(Convert.ToByte(color.A * 255), Convert.ToByte(color.R * 255), Convert.ToByte(color.G * 255), Convert.ToByte(color.B * 255));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment