/* * Copyright(c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System; using Tizen.NUI.Binding; using System.ComponentModel; using System.Globalization; namespace Tizen.NUI { /// /// The Color class. /// [Tizen.NUI.Binding.TypeConverter(typeof(ColorTypeConverter))] public class Color : Disposable, ICloneable { /// /// Gets the alice_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color AliceBlue = NDalic.ALICE_BLUE; /// /// Gets the antique_white colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color AntiqueWhite = NDalic.ANTIQUE_WHITE; /// /// Gets the aqua colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Aqua = NDalic.AQUA; /// /// Gets the aqua_marine colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color AquaMarine = NDalic.AQUA_MARINE; /// /// Gets the azure colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Azure = NDalic.AZURE; /// /// Gets the beige colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Beige = NDalic.BEIGE; /// /// Gets the bisque colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Bisque = NDalic.BISQUE; /// /// Gets the black colored Color class. /// /// 3 public static readonly Color Black = NDalic.BLACK; /// /// Gets the blanche_dalmond colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color BlancheDalmond = NDalic.BLANCHE_DALMOND; /// /// Gets the blue colored Color class. /// /// 3 public static readonly Color Blue = NDalic.BLUE; /// /// Gets the blue_violet colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color BlueViolet = NDalic.BLUE_VIOLET; /// /// Gets the brown colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Brown = NDalic.BROWN; /// /// Gets the burly_wood colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color BurlyWood = NDalic.BURLY_WOOD; /// /// Gets the cadet_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color CadetBlue = NDalic.CADET_BLUE; /// /// Gets the chartreuse colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Chartreuse = NDalic.CHARTREUSE; /// /// Gets the chocolate colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Chocolate = NDalic.CHOCOLATE; /// /// Gets the coral colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Coral = NDalic.CORAL; /// /// Gets the cornflower_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color CornflowerBlue = NDalic.CORNFLOWER_BLUE; /// /// Gets the cornsilk colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Cornsilk = NDalic.CORNSILK; /// /// Gets the crimson colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Crimson = NDalic.CRIMSON; /// /// Gets the cyan colored Color class. /// /// 3 public static readonly Color Cyan = NDalic.CYAN; /// /// Gets the dark_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkBlue = NDalic.DARK_BLUE; /// /// Gets the dark_cyan colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkCyan = NDalic.DARK_CYAN; /// /// Gets the dark_goldenrod colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkGoldenrod = NDalic.DARK_GOLDENROD; /// /// Gets the dark_gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkGray = NDalic.DARK_GRAY; /// /// Gets the dark_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkGreen = NDalic.DARK_GREEN; /// /// Gets the dark_grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkGrey = NDalic.DARK_GREY; /// /// Gets the dark_khaki colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkKhaki = NDalic.DARK_KHAKI; /// /// Gets the dark_magenta colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkMagenta = NDalic.DARK_MAGENTA; /// /// Gets the dark_olive_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkOliveGreen = NDalic.DARK_OLIVE_GREEN; /// /// Gets the dark_orange colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkOrange = NDalic.DARK_ORANGE; /// /// Gets the dark_orchid colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkOrchid = NDalic.DARK_ORCHID; /// /// Gets the dark_red colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkRed = NDalic.DARK_RED; /// /// Gets the dark_salmon colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkSalmon = NDalic.DARK_SALMON; /// /// Gets the dark_sea_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkSeaGreen = NDalic.DARK_SEA_GREEN; /// /// Gets the dark_slate_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkSlateBlue = NDalic.DARK_SLATE_BLUE; /// /// Gets the dark_slate_gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkSlateGray = NDalic.DARK_SLATE_GRAY; /// /// Gets the dark_slate_grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkSlateGrey = NDalic.DARK_SLATE_GREY; /// /// Gets the dark_turquoise colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkTurquoise = NDalic.DARK_TURQUOISE; /// /// Gets the dark_violet colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DarkViolet = NDalic.DARK_VIOLET; /// /// Gets the deep_pink colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DeepPink = NDalic.DEEP_PINK; /// /// Gets the deep_sky_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DeepSkyBlue = NDalic.DEEP_SKY_BLUE; /// /// Gets the dim_gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DimGray = NDalic.DIM_GRAY; /// /// Gets the dim_grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DimGrey = NDalic.DIM_GREY; /// /// Gets the dodger_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color DodgerBlue = NDalic.DODGER_BLUE; /// /// Gets the fire_brick colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color FireBrick = NDalic.FIRE_BRICK; /// /// Gets the floral_white colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color FloralWhite = NDalic.FLORAL_WHITE; /// /// Gets the forest_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color ForestGreen = NDalic.FOREST_GREEN; /// /// Gets the fuchsia colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Fuchsia = NDalic.FUCHSIA; /// /// Gets the gainsboro colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Gainsboro = NDalic.GAINSBORO; /// /// Gets the ghost_white colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color GhostWhite = NDalic.GHOST_WHITE; /// /// Gets the gold colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Gold = NDalic.GOLD; /// /// Gets the golden_rod colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color GoldenRod = NDalic.GOLDEN_ROD; /// /// Gets the gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Gray = NDalic.GRAY; /// /// Gets the green colored Color class. /// /// 3 public static readonly Color Green = NDalic.GREEN; /// /// Gets the green_yellow colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color GreenYellow = NDalic.GREEN_YELLOW; /// /// Gets the grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Grey = NDalic.GREY; /// /// Gets the honeydew colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Honeydew = NDalic.HONEYDEW; /// /// Gets the hot_pink colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color HotPink = NDalic.HOT_PINK; /// /// Gets the indianred colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Indianred = NDalic.INDIANRED; /// /// Gets the indigo colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Indigo = NDalic.INDIGO; /// /// Gets the ivory colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Ivory = NDalic.IVORY; /// /// Gets the khaki colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Khaki = NDalic.KHAKI; /// /// Gets the lavender colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Lavender = NDalic.LAVENDER; /// /// Gets the lavender_blush colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LavenderBlush = NDalic.LAVENDER_BLUSH; /// /// Gets the lawn_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LawnGreen = NDalic.LAWN_GREEN; /// /// Gets the lemon_chiffon colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LemonChiffon = NDalic.LEMON_CHIFFON; /// /// Gets the light_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightBlue = NDalic.LIGHT_BLUE; /// /// Gets the light_coral colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightCoral = NDalic.LIGHT_CORAL; /// /// Gets the light_cyan colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightCyan = NDalic.LIGHT_CYAN; /// /// Gets the light_golden_rod_yellow colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightGoldenRodYellow = NDalic.LIGHT_GOLDEN_ROD_YELLOW; /// /// Gets the light_gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightGray = NDalic.LIGHT_GRAY; /// /// Gets the light_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightGreen = NDalic.LIGHT_GREEN; /// /// Gets the light_grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightGrey = NDalic.LIGHT_GREY; /// /// Gets the light_pink colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightPink = NDalic.LIGHT_PINK; /// /// Gets the light_salmon colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightSalmon = NDalic.LIGHT_SALMON; /// /// Gets the light_sea_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightSeaGreen = NDalic.LIGHT_SEA_GREEN; /// /// Gets the light_sky_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightSkyBlue = NDalic.LIGHT_SKY_BLUE; /// /// Gets the light_slate_gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightSlateGray = NDalic.LIGHT_SLATE_GRAY; /// /// Gets the light_slate_grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightSlateGrey = NDalic.LIGHT_SLATE_GREY; /// /// Gets the light_steel_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightSteelBlue = NDalic.LIGHT_STEEL_BLUE; /// /// Gets the light_yellow colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LightYellow = NDalic.LIGHT_YELLOW; /// /// Gets the lime colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Lime = NDalic.LIME; /// /// Gets the lime_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color LimeGreen = NDalic.LIME_GREEN; /// /// Gets the linen colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Linen = NDalic.LINEN; /// /// Gets the magenta colored Color class. /// /// 3 public static readonly Color Magenta = NDalic.MAGENTA; /// /// Gets the maroon colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Maroon = NDalic.MAROON; /// /// Gets the medium_aqua_marine colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumAquaMarine = NDalic.MEDIUM_AQUA_MARINE; /// /// Gets the medium_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumBlue = NDalic.MEDIUM_BLUE; /// /// Gets the medium_orchid colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumOrchid = NDalic.MEDIUM_ORCHID; /// /// Gets the medium_purple colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumPurple = NDalic.MEDIUM_PURPLE; /// /// Gets the medium_sea_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumSeaGreen = NDalic.MEDIUM_SEA_GREEN; /// /// Gets the medium_slate_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumSlateBlue = NDalic.MEDIUM_SLATE_BLUE; /// /// Gets the medium_spring_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumSpringGreen = NDalic.MEDIUM_SPRING_GREEN; /// /// Gets the medium_turquoise colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumTurquoise = NDalic.MEDIUM_TURQUOISE; /// /// Gets the medium_violetred colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MediumVioletred = NDalic.MEDIUM_VIOLETRED; /// /// Gets the midnight_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MidnightBlue = NDalic.MIDNIGHT_BLUE; /// /// Gets the mint_cream colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MintCream = NDalic.MINT_CREAM; /// /// Gets the misty_rose colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color MistyRose = NDalic.MISTY_ROSE; /// /// Gets the moccasin colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Moccasin = NDalic.MOCCASIN; /// /// Gets the navajo_white colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color NavajoWhite = NDalic.NAVAJO_WHITE; /// /// Gets the navy colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Navy = NDalic.NAVY; /// /// Gets the old_lace colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color OldLace = NDalic.OLD_LACE; /// /// Gets the olive colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Olive = NDalic.OLIVE; /// /// Gets the olive_drab colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color OliveDrab = NDalic.OLIVE_DRAB; /// /// Gets the orange colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Orange = NDalic.ORANGE; /// /// Gets the orange_red colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color OrangeRed = NDalic.ORANGE_RED; /// /// Gets the orchid colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Orchid = NDalic.ORCHID; /// /// Gets the pale_golden_rod colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PaleGoldenRod = NDalic.PALE_GOLDEN_ROD; /// /// Gets the pale_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PaleGreen = NDalic.PALE_GREEN; /// /// Gets the Pale_Turquoise colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PaleTurquoise = NDalic.PALE_TURQUOISE; /// /// Gets the Pale_Violet_Red colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PaleVioletRed = NDalic.PALE_VIOLET_RED; /// /// Gets the Papaya_whip colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PapayaWhip = NDalic.PAPAYA_WHIP; /// /// Gets the Peach_puff colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PeachPuff = NDalic.PEACH_PUFF; /// /// Gets the peru colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Peru = NDalic.PERU; /// /// Gets the pink colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Pink = NDalic.PINK; /// /// Gets the plum colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Plum = NDalic.PLUM; /// /// Gets the powder_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color PowderBlue = NDalic.POWDER_BLUE; /// /// Gets the purple colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Purple = NDalic.PURPLE; /// /// Gets the red colored Color class. /// /// 3 public static readonly Color Red = NDalic.RED; /// /// Gets the rosy_brown colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color RosyBrown = NDalic.ROSY_BROWN; /// /// Gets the royal_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color RoyalBlue = NDalic.ROYAL_BLUE; /// /// Gets the saddle_brown colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SaddleBrown = NDalic.SADDLE_BROWN; /// /// Gets the salmon colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Salmon = NDalic.SALMON; /// /// Gets the sandy_brown colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SandyBrown = NDalic.SANDY_BROWN; /// /// Gets the sea_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SeaGreen = NDalic.SEA_GREEN; /// /// Gets the sea_shell colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SeaShell = NDalic.SEA_SHELL; /// /// Gets the sienna colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Sienna = NDalic.SIENNA; /// /// Gets the silver colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Silver = NDalic.SILVER; /// /// Gets the sky_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SkyBlue = NDalic.SKY_BLUE; /// /// Gets the slate_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SlateBlue = NDalic.SLATE_BLUE; /// /// Gets the slate_gray colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SlateGray = NDalic.SLATE_GRAY; /// /// Gets the slate_grey colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SlateGrey = NDalic.SLATE_GREY; /// /// Gets the snow colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Snow = NDalic.SNOW; /// /// Gets the spring_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SpringGreen = NDalic.SPRING_GREEN; /// /// Gets the steel_blue colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color SteelBlue = NDalic.STEEL_BLUE; /// /// Gets the tan colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Tan = NDalic.TAN; /// /// Gets the teal colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Teal = NDalic.TEAL; /// /// Gets the thistle colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Thistle = NDalic.THISTLE; /// /// Gets the tomato colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Tomato = NDalic.TOMATO; /// /// Gets the transparent colored Color class. /// /// 3 public static readonly Color Transparent = NDalic.TRANSPARENT; /// /// Gets the turquoise colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Turquoise = NDalic.TURQUOISE; /// /// Gets the violet colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Violet = NDalic.VIOLET; /// /// Gets the wheat colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color Wheat = NDalic.WHEAT; /// /// Gets the white colored Color class. /// /// 3 public static readonly Color White = NDalic.WHITE; /// /// Gets the white_smoke colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color WhiteSmoke = NDalic.WHITE_SMOKE; /// /// Gets the yellow colored Color class. /// /// 3 public static readonly Color Yellow = NDalic.YELLOW; /// /// Gets the yellow_green colored Color class. /// [EditorBrowsable(EditorBrowsableState.Never)] public static readonly Color YellowGreen = NDalic.YELLOW_GREEN; private readonly bool hashDummy; /// /// Default constructor /// /// 3 public Color() : this(Interop.Vector4.NewVector4(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The constructor. /// /// The red component. /// The green component. /// The blue component. /// The alpha component. /// 3 public Color(float r, float g, float b, float a) : this(Interop.Vector4.NewVector4(ValueCheck(r), ValueCheck(g), ValueCheck(b), ValueCheck(a)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The conversion constructor from an array of four floats. /// /// array Array of R,G,B,A. /// 3 public Color(float[] array) : this(Interop.Vector4.NewVector4(ValueCheck(array)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } /// /// The conversion constructor from text color representation. /// hexcode representation : #RGB #RGBA #RRGGBB #RRGGBBAA /// rgb representation : rgb(0-255,0-255,0-255) rgba(0-255,0-255,0-255,0.0-1.0) /// /// color text representation as Hexcode, rgb() or rgba() /// This exception is thrown when hexColor is null. /// 6 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public Color(string textColor) : this(Interop.Vector4.NewVector4(), true) { try { if (null == textColor) { throw new ArgumentNullException(nameof(textColor)); } textColor = textColor.ToUpperInvariant(); textColor = textColor.Replace(" ", ""); if (textColor.Length > 0 && textColor[0] == '#') { textColor = textColor.Replace("#", ""); int textColorLength = textColor.Length; if (textColorLength == 6 || textColorLength == 8) /* #RRGGBB or #RRGGBBAA */ { R = ((float)Convert.ToInt32(textColor.Substring(0, 2), 16)) / 255.0f; G = ((float)Convert.ToInt32(textColor.Substring(2, 2), 16)) / 255.0f; B = ((float)Convert.ToInt32(textColor.Substring(4, 2), 16)) / 255.0f; A = textColor.Length > 6 ? ((float)Convert.ToInt32(textColor.Substring(6, 2), 16)) / 255.0f : 1.0f; } else if (textColorLength == 3 || textColorLength == 4) /* #RGB */ { R = ((float)Convert.ToInt32(textColor.Substring(0, 1), 16)) / 15.0f; G = ((float)Convert.ToInt32(textColor.Substring(1, 1), 16)) / 15.0f; B = ((float)Convert.ToInt32(textColor.Substring(2, 1), 16)) / 15.0f; A = textColor.Length > 3 ? ((float)Convert.ToInt32(textColor.Substring(3, 1), 16)) / 15.0f : 1.0f; } else { throw new global::System.ArgumentException("Please check your color text code"); } } else // example rgb(255,255,255) or rgb(255,255,255,1.0) { bool isRGBA = textColor.StartsWith("RGBA("); bool isRGB = textColor.StartsWith("RGB("); if (!isRGBA && !isRGB) { throw new global::System.ArgumentException("Please check your color text code"); } if (isRGBA) textColor = textColor.Substring(4); if (isRGB) textColor = textColor.Substring(3); textColor = textColor.Replace(")", ""); textColor = textColor.Replace("(", ""); string[] components = textColor.Split(','); if (components.Length == 3 && isRGB) { R = Math.Min(1.0f, ((float)Convert.ToInt32(components[0], 10)) / 255.0f); G = Math.Min(1.0f, ((float)Convert.ToInt32(components[1], 10)) / 255.0f); B = Math.Min(1.0f, ((float)Convert.ToInt32(components[2], 10)) / 255.0f); A = 1.0f; } else if (components.Length == 4 && isRGBA) { R = Math.Min(1.0f, ((float)Convert.ToInt32(components[0], 10)) / 255.0f); G = Math.Min(1.0f, ((float)Convert.ToInt32(components[1], 10)) / 255.0f); B = Math.Min(1.0f, ((float)Convert.ToInt32(components[2], 10)) / 255.0f); A = Math.Min(1.0f, float.Parse(components[3], CultureInfo.InvariantCulture)); } } } catch { throw new global::System.ArgumentException("Please check your color text code"); } } /// /// The conversion constructor from an System.Drawing.Color instance. /// /// System.Drawing.Color instance [EditorBrowsable(EditorBrowsableState.Never)] public Color(global::System.Drawing.Color color) : this(Interop.Vector4.NewVector4(), true) { R = color.R / 255.0f; G = color.G / 255.0f; B = color.B / 255.0f; A = color.A / 255.0f; } /// /// The copy constructor. /// /// The copy target. /// Thrown when other is null. [EditorBrowsable(EditorBrowsableState.Never)] public Color(Color other) : this(other == null ? throw new ArgumentNullException(nameof(other)) : other.R, other.G, other.B, other.A) { } internal Color(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { hashDummy = false; } internal Color(ColorChangedCallback cb, float r, float g, float b, float a) : this(Interop.Vector4.NewVector4(ValueCheck(r), ValueCheck(g), ValueCheck(b), ValueCheck(a)), true) { callback = cb; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal Color(ColorChangedCallback cb, Color other) : this(cb, other.R, other.G, other.B, other.A) { } internal delegate void ColorChangedCallback(float r, float g, float b, float a); private ColorChangedCallback callback = null; /// /// The red component. /// /// /// The setter is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor. /// /// /// // DO NOT use as follows: /// Color color = new Color(); /// color.R = 0.1f; /// // USE like this /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f; /// Color color = new Color(r, g, b, a); /// /// 3 public float R { [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")] set { Interop.Vector4.RSet(SwigCPtr, ValueCheck(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(R, G, B, A); } get { float ret = Interop.Vector4.RGet(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); return ret; } } /// /// The green component. /// /// /// The setter is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor. /// /// /// // DO NOT use as follows: /// Color color = new Color(); /// color.G = 0.5f; /// // USE like this /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f; /// Color color = new Color(r, g, b, a); /// /// 3 public float G { [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")] set { Interop.Vector4.GSet(SwigCPtr, ValueCheck(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(R, G, B, A); } get { float ret = Interop.Vector4.GGet(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); return ret; } } /// /// The blue component. /// /// /// The setter is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor. /// /// /// // DO NOT use as follows: /// Color color = new Color(); /// color.B = 0.9f; /// // USE like this /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f; /// Color color = new Color(r, g, b, a); /// /// 3 public float B { [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")] set { Interop.Vector4.BSet(SwigCPtr, ValueCheck(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(R, G, B, A); } get { float ret = Interop.Vector4.BGet(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); return ret; } } /// /// The alpha component. /// /// /// The setter is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor. /// /// /// // DO NOT use as follows: /// Color color = new Color(); /// color.A = 1.0f; /// // USE like this /// float r = 0.1f, g = 0.5f, b = 0.9f, a = 1.0f; /// Color color = new Color(r, g, b, a); /// /// 3 public float A { [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use the new Color(...) constructor")] set { Interop.Vector4.ASet(SwigCPtr, ValueCheck(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); callback?.Invoke(R, G, B, A); } get { float ret = Interop.Vector4.AGet(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); return ret; } } /// /// The array subscript operator overload. /// /// The subscript index. /// The float at the given index. /// 3 public float this[uint index] { get { return ValueOfIndex(index); } } /// /// Converts the Color class to Vector4 class implicitly. /// /// A color to be converted to Vector4 /// 3 public static implicit operator Vector4(Color color) { if (color == null) { return null; } return new Vector4(color.R, color.G, color.B, color.A); } /// /// Converts Vector4 class to Color class implicitly. /// /// A Vector4 to be converted to color. /// 3 public static implicit operator Color(Vector4 vec) { if (vec == null) { return null; } return new Color(vec.R, vec.G, vec.B, vec.A); } /// /// The addition operator. /// /// The first value. /// The second value. /// The color containing the result of the addition. /// Thrown when arg1 is null. /// 3 public static Color operator +(Color arg1, Color arg2) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Add(arg2); return ValueCheck(result); } /// /// The subtraction operator. /// /// The first value. /// The second value. /// The color containing the result of the subtraction. /// Thrown when arg1 is null. /// 3 public static Color operator -(Color arg1, Color arg2) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Subtract(arg2); return ValueCheck(result); } /// /// The unary negation operator. /// /// The target value. /// The color containg the negation. /// Thrown when arg1 is null. /// 3 public static Color operator -(Color arg1) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Subtract(); return ValueCheck(result); } /// /// The multiplication operator. /// /// The first value. /// The second value. /// The color containing the result of the multiplication. /// Thrown when arg1 is null. /// 3 public static Color operator *(Color arg1, Color arg2) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Multiply(arg2); return ValueCheck(result); } /// /// The multiplication operator. /// /// The first value. /// The second value. /// The color containing the result of the multiplication. /// Thrown when arg1 is null. /// 3 public static Color operator *(Color arg1, float arg2) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Multiply(arg2); return ValueCheck(result); } /// /// The division operator. /// /// The first value. /// The second value. /// The color containing the result of the division. /// Thrown when arg1 is null. /// 3 public static Color operator /(Color arg1, Color arg2) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Divide(arg2); return ValueCheck(result); } /// /// The division operator. /// /// The first value. /// The second value. /// The color containing the result of the division. /// Thrown when arg1 is null. /// 3 public static Color operator /(Color arg1, float arg2) { if (null == arg1) { throw new ArgumentNullException(nameof(arg1)); } Color result = arg1.Divide(arg2); return ValueCheck(result); } /// /// Checks if two color classes are same. /// /// A color to be compared. /// If two colors are are same, then true. /// 3 public bool EqualTo(Color rhs) { bool ret = Interop.Vector4.EqualTo(SwigCPtr, Color.getCPtr(rhs)); if (rhs == null) return false; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// /// Checks if two color classes are different. /// /// A color to be compared. /// If two colors are are different, then true. /// 3 public bool NotEqualTo(Color rhs) { bool ret = Interop.Vector4.NotEqualTo(SwigCPtr, Color.getCPtr(rhs)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// [EditorBrowsable(EditorBrowsableState.Never)] public object Clone() => new Color(this); internal static Color GetColorFromPtr(global::System.IntPtr cPtr) { Color ret = new Color(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } internal static Color ValueCheck(Color color) { float r = color.R; float g = color.G; float b = color.B; float a = color.A; if (IsInvalidValue(ref r) | IsInvalidValue(ref g) | IsInvalidValue(ref b) | IsInvalidValue(ref a)) { NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. Color is {color.R}, {color.G}, {color.B}, {color.A}"); } color = new Color(r, g, b, a); return color; } internal static float ValueCheck(float value) { float refValue = value; if (IsInvalidValue(ref refValue)) { NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. float value is {value}"); } return refValue; } internal static float[] ValueCheck(float[] arr) { if (null == arr) { throw new ArgumentNullException(nameof(arr)); } for (int i = 0; i < arr.Length; i++) { float refValue = arr[i]; if (IsInvalidValue(ref refValue)) { NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. arr[] is {arr[i]}"); arr[i] = refValue; } } return arr; } private static bool IsInvalidValue(ref float value) { if (value < 0.0f) { value = 0.0f; return true; } else if (value > 1.0f) { value = 1.0f; return true; } return false; } /// This will not be public opened. [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.Vector4.DeleteVector4(swigCPtr); } private Color Add(Color rhs) { Color ret = new Color(Interop.Vector4.Add(SwigCPtr, Color.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color AddAssign(Vector4 rhs) { Color ret = new Color(Interop.Vector4.AddAssign(SwigCPtr, Color.getCPtr(rhs)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color Subtract(Color rhs) { Color ret = new Color(Interop.Vector4.Subtract(SwigCPtr, Color.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color SubtractAssign(Color rhs) { Color ret = new Color(Interop.Vector4.SubtractAssign(SwigCPtr, Color.getCPtr(rhs)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color Multiply(Color rhs) { Color ret = new Color(Interop.Vector4.Multiply(SwigCPtr, Color.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color Multiply(float rhs) { Color ret = new Color(Interop.Vector4.Multiply(SwigCPtr, rhs), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color MultiplyAssign(Color rhs) { Color ret = new Color(Interop.Vector4.MultiplyAssign(SwigCPtr, Color.getCPtr(rhs)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color MultiplyAssign(float rhs) { Color ret = new Color(Interop.Vector4.MultiplyAssign(SwigCPtr, rhs), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color Divide(Vector4 rhs) { Color ret = new Color(Interop.Vector4.Divide(SwigCPtr, Color.getCPtr(rhs)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color Divide(float rhs) { Color ret = new Color(Interop.Vector4.Divide(SwigCPtr, rhs), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color DivideAssign(Color rhs) { Color ret = new Color(Interop.Vector4.DivideAssign(SwigCPtr, Color.getCPtr(rhs)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color DivideAssign(float rhs) { Color ret = new Color(Interop.Vector4.DivideAssign(SwigCPtr, rhs), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private Color Subtract() { Color ret = new Color(Interop.Vector4.Subtract(SwigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } private static bool EqualsColorValue(float f1, float f2) { float EPS = (float)Math.Abs(f1 * .00001); if (Math.Abs(f1 - f2) <= EPS) { return true; } else { return false; } } private static bool EqualsColor(Color c1, Color c2) { return EqualsColorValue(c1.R, c2.R) && EqualsColorValue(c1.G, c2.G) && EqualsColorValue(c1.B, c2.B) && EqualsColorValue(c1.A, c2.A); } /// /// Determines whether the specified object is equal to the current object. /// /// The object to compare with the current object. /// true if the specified object is equal to the current object; otherwise, false. /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(System.Object obj) { Color color = obj as Color; bool equal = false; if (color == null) { return equal; } if (EqualsColor(this, color)) { equal = true; } return equal; } /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { return hashDummy.GetHashCode(); } private float ValueOfIndex(uint index) { float ret = Interop.Vector4.ValueOfIndex(SwigCPtr, index); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } }