Created
February 4, 2016 11:27
-
-
Save peterfoot/be89d5b3c5ac4cc16ae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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