From ba29e59d20f4ae4b910b8576bc59af814ca4e151 Mon Sep 17 00:00:00 2001 From: Kangho Date: Thu, 11 Aug 2016 18:39:32 +0900 Subject: [PATCH] Add Orange color to Color (#290) * Add Orange color to Color --- Xamarin.Forms.Core/Color.cs | 1 + Xamarin.Forms.Core/ColorTypeConverter.cs | 2 ++ docs/Xamarin.Forms.Core/Xamarin.Forms/Color.xml | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Xamarin.Forms.Core/Color.cs b/Xamarin.Forms.Core/Color.cs index e9f2987..1444d98 100644 --- a/Xamarin.Forms.Core/Color.cs +++ b/Xamarin.Forms.Core/Color.cs @@ -362,6 +362,7 @@ namespace Xamarin.Forms public static readonly Color Maroon = FromRgb(128, 0, 0); public static readonly Color Navy = FromRgb(0, 0, 128); public static readonly Color Olive = FromRgb(128, 128, 0); + public static readonly Color Orange = FromRgb(255, 165, 0); public static readonly Color Purple = FromRgb(128, 0, 128); public static readonly Color Pink = FromRgb(255, 102, 255); public static readonly Color Red = FromRgb(255, 0, 0); diff --git a/Xamarin.Forms.Core/ColorTypeConverter.cs b/Xamarin.Forms.Core/ColorTypeConverter.cs index 547adf3..612174e 100644 --- a/Xamarin.Forms.Core/ColorTypeConverter.cs +++ b/Xamarin.Forms.Core/ColorTypeConverter.cs @@ -42,6 +42,8 @@ namespace Xamarin.Forms return Color.Navy; case "Olive": return Color.Olive; + case "Orange": + return Color.Orange; case "Purple": return Color.Purple; case "Pink": diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/Color.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/Color.xml index 755a61d..4368943 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/Color.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/Color.xml @@ -43,7 +43,7 @@ Application developers can specify colors in XAML either as a hexadecimal number or as a valid color name. When specifying a color with a hexadecimal number, app developers can use 3, 4, or 6 digits. If the developer specifies 3 digits, they are interpreted as RGB doublet data for a fully opaque color. For example, "#123" specifies the color that is represented by "#FF112233". If the developer provides a 4-digit hexadecimal number, then the data are interpreted as above, except that the first digit specifies the alpha channel. For example, "#1234" specifies the color that is represented by "#11223344". Finally, if the developer provides a 6 digit hexadecimal number, the data are interpreted as a fully opaque color with those RGB values. For example, "#112233" specifies the color that is represented by "#FF112233". When specifying a color with a string, app developers can use color name in isolation, or prefix it with "Color.". For example, both Purple and Color.Purple are valid ways to specify the color purple. The following table describes the valid color names that can be used to specify colors in XAML. -ColorShort NameRGB ValueColor.TransparentTransparent0, 0, 0 (With the alpha channel set to 0.)Color.AquaAqua0, 255, 255Color.BlackBlack0, 0, 0Color.BlueBlue0, 0, 255Color.FuchsiaFuchsia255, 0, 255Color.GrayGray128, 128, 128Color.GreenGreen0, 128, 0Color.LimeLime0, 255, 0Color.MaroonMaroon128, 0, 0Color.NavyNavy0, 0, 128Color.OliveOlive128, 128, 0Color.PurplePurple128, 0, 128Color.PinkPink255, 102, 255Color.RedRed255, 0, 0Color.SilverSilver192, 192, 192Color.TealTeal0, 128, 128Color.WhiteWhite255, 255, 255Color.YellowYellow255, 255, 0 +ColorShort NameRGB ValueColor.TransparentTransparent0, 0, 0 (With the alpha channel set to 0.)Color.AquaAqua0, 255, 255Color.BlackBlack0, 0, 0Color.BlueBlue0, 0, 255Color.FuchsiaFuchsia255, 0, 255Color.GrayGray128, 128, 128Color.GreenGreen0, 128, 0Color.LimeLime0, 255, 0Color.MaroonMaroon128, 0, 0Color.NavyNavy0, 0, 128Color.OliveOlive128, 128, 0Color.OrangeOrange255, 165, 0Color.PurplePurple128, 0, 128Color.PinkPink255, 102, 255Color.RedRed255, 0, 0Color.SilverSilver192, 192, 192Color.TealTeal0, 128, 128Color.WhiteWhite255, 255, 255Color.YellowYellow255, 255, 0 @@ -897,6 +897,22 @@ To be added. + + + + Field + + 2.0.0.0 + + + Xamarin.Forms.Color + + + Orange, the color that is represented by the RGB value #ffa500. + + + + -- 2.7.4