name property Null safety

String name

Return the Web color name associated with the X11 color name.

Implementation

String get name {
  switch (this) {
    // Pink colors
    case X11Colors.MediumVioletRed:
      return 'mediumvioletred';
    case X11Colors.DeepPink:
      return 'deeppink';
    case X11Colors.PaleVioletRed:
      return 'palevioletred';
    case X11Colors.HotPink:
      return 'hotpink';
    case X11Colors.LightPink:
      return 'lightpink';
    case X11Colors.Pink:
      return 'pink';

    // Red colors
    case X11Colors.DarkRed:
      return 'darkred';
    case X11Colors.Red:
      return 'red';
    case X11Colors.Firebrick:
      return 'firebrick';
    case X11Colors.Crimson:
      return 'crimson';
    case X11Colors.IndianRed:
      return 'indianred';
    case X11Colors.LightCoral:
      return 'lightcoral';
    case X11Colors.Salmon:
      return 'salmon';
    case X11Colors.DarkSalmon:
      return 'darksalmon';
    case X11Colors.LightSalmon:
      return 'lightsalmon';

    // Orange colors
    case X11Colors.OrangeRed:
      return 'orangered';
    case X11Colors.Tomato:
      return 'tomato';
    case X11Colors.DarkOrange:
      return 'darkorange';
    case X11Colors.Coral:
      return 'coral';
    case X11Colors.Orange:
      return 'orange';

    // Yellow colors
    case X11Colors.DarkKhaki:
      return 'darkkhaki';
    case X11Colors.Gold:
      return 'gold';
    case X11Colors.Khaki:
      return 'khaki';
    case X11Colors.PeachPuff:
      return 'peachpuff';
    case X11Colors.Yellow:
      return 'yellow';
    case X11Colors.PaleGoldenrod:
      return 'palegoldenrod';
    case X11Colors.Moccasin:
      return 'moccasin';
    case X11Colors.PapayaWhip:
      return 'papayawhip';
    case X11Colors.LightGoldenrodYellow:
      return 'lightgoldenrodyellow';
    case X11Colors.LemonChiffon:
      return 'lemonchiffon';
    case X11Colors.LightYellow:
      return 'lightyellow';

    // Brown colors
    case X11Colors.Maroon:
      return 'maroon';
    case X11Colors.Brown:
      return 'brown';
    case X11Colors.SaddleBrown:
      return 'saddlebrown';
    case X11Colors.Sienna:
      return 'sienna';
    case X11Colors.Chocolate:
      return 'chocolate';
    case X11Colors.DarkGoldenrod:
      return 'darkgoldenrod';
    case X11Colors.Peru:
      return 'peru';
    case X11Colors.RosyBrown:
      return 'rosybrown';
    case X11Colors.Goldenrod:
      return 'goldenrod';
    case X11Colors.SandyBrown:
      return 'sandybrown';
    case X11Colors.Tan:
      return 'tan';
    case X11Colors.Burlywood:
      return 'burlywood';
    case X11Colors.Wheat:
      return 'wheat';
    case X11Colors.NavajoWhite:
      return 'navajowhite';
    case X11Colors.Bisque:
      return 'bisque';
    case X11Colors.BlanchedAlmond:
      return 'blanchedalmond';
    case X11Colors.Cornsilk:
      return 'cornsilk';

    // Green colors
    case X11Colors.DarkGreen:
      return 'darkgreen';
    case X11Colors.Green:
      return 'green';
    case X11Colors.DarkOliveGreen:
      return 'darkolivegreen';
    case X11Colors.ForestGreen:
      return 'forestgreen';
    case X11Colors.SeaGreen:
      return 'seagreen';
    case X11Colors.Olive:
      return 'olive';
    case X11Colors.OliveDrab:
      return 'olivedrab';
    case X11Colors.MediumSeaGreen:
      return 'mediumseagreen';
    case X11Colors.LimeGreen:
      return 'limegreen';
    case X11Colors.Lime:
      return 'lime';
    case X11Colors.SpringGreen:
      return 'springgreen';
    case X11Colors.MediumSpringGreen:
      return 'mediumspringgreen';
    case X11Colors.DarkSeaGreen:
      return 'darkseagreen';
    case X11Colors.MediumAquamarine:
      return 'mediumaquamarine';
    case X11Colors.YellowGreen:
      return 'yellowgreen';
    case X11Colors.LawnGreen:
      return 'lawngreen';
    case X11Colors.Chartreuse:
      return 'chartreuse';
    case X11Colors.LightGreen:
      return 'lightgreen';
    case X11Colors.GreenYellow:
      return 'greenyellow';
    case X11Colors.PaleGreen:
      return 'palegreen';

    // Cyan colors
    case X11Colors.Teal:
      return 'teal';
    case X11Colors.DarkCyan:
      return 'darkcyan';
    case X11Colors.LightSeaGreen:
      return 'lightseagreen';
    case X11Colors.CadetBlue:
      return 'cadetblue';
    case X11Colors.DarkTurquoise:
      return 'darkturquoise';
    case X11Colors.MediumTurquoise:
      return 'mediumturquoise';
    case X11Colors.Turquoise:
      return 'turquoise';
    case X11Colors.Aqua:
      return 'aqua';
    case X11Colors.Cyan:
      return 'cyan';
    case X11Colors.Aquamarine:
      return 'aquamarine';
    case X11Colors.PaleTurquoise:
      return 'paleturquoise';
    case X11Colors.LightCyan:
      return 'lightcyan';

    // Blue colors
    case X11Colors.Navy:
      return 'navy';
    case X11Colors.DarkBlue:
      return 'darkblue';
    case X11Colors.MediumBlue:
      return 'mediumblue';
    case X11Colors.Blue:
      return 'blue';
    case X11Colors.MidnightBlue:
      return 'midnightblue';
    case X11Colors.RoyalBlue:
      return 'royalblue';
    case X11Colors.SteelBlue:
      return 'steelblue';
    case X11Colors.DodgerBlue:
      return 'dodgerblue';
    case X11Colors.DeepSkyBlue:
      return 'deepskyblue';
    case X11Colors.CornflowerBlue:
      return 'cornflowerblue';
    case X11Colors.SkyBlue:
      return 'skyblue';
    case X11Colors.LightSkyBlue:
      return 'lightskyblue';
    case X11Colors.LightSteelBlue:
      return 'lightsteelblue';
    case X11Colors.LightBlue:
      return 'lightblue';
    case X11Colors.PowderBlue:
      return 'powderblue';

    // Purple violet and magenta colors
    case X11Colors.Indigo:
      return 'indigo';
    case X11Colors.Purple:
      return 'purple';
    case X11Colors.DarkMagenta:
      return 'darkmagenta';
    case X11Colors.DarkViolet:
      return 'darkviolet';
    case X11Colors.DarkSlateBlue:
      return 'darkslateblue';
    case X11Colors.BlueViolet:
      return 'blueviolet';
    case X11Colors.DarkOrchid:
      return 'darkorchid';
    case X11Colors.Fuchsia:
      return 'fuchsia';
    case X11Colors.Magenta:
      return 'magenta';
    case X11Colors.SlateBlue:
      return 'slateblue';
    case X11Colors.MediumSlateBlue:
      return 'mediumslateblue';
    case X11Colors.MediumOrchid:
      return 'mediumorchid';
    case X11Colors.MediumPurple:
      return 'mediumpurple';
    case X11Colors.Orchid:
      return 'orchid';
    case X11Colors.Violet:
      return 'violet';
    case X11Colors.Plum:
      return 'plum';
    case X11Colors.Thistle:
      return 'thistle';
    case X11Colors.Lavender:
      return 'lavender';

    // White colors
    case X11Colors.MistyRose:
      return 'mistyrose';
    case X11Colors.AntiqueWhite:
      return 'antiquewhite';
    case X11Colors.Linen:
      return 'linen';
    case X11Colors.Beige:
      return 'beige';
    case X11Colors.WhiteSmoke:
      return 'whitesmoke';
    case X11Colors.LavenderBlush:
      return 'lavenderblush';
    case X11Colors.OldLace:
      return 'oldlace';
    case X11Colors.AliceBlue:
      return 'aliceblue';
    case X11Colors.Seashell:
      return 'seashell';
    case X11Colors.GhostWhite:
      return 'ghostwhite';
    case X11Colors.Honeydew:
      return 'honeydew';
    case X11Colors.FloralWhite:
      return 'floralwhite';
    case X11Colors.Azure:
      return 'azure';
    case X11Colors.MintCream:
      return 'mintcream';
    case X11Colors.Snow:
      return 'snow';
    case X11Colors.Ivory:
      return 'ivory';
    case X11Colors.White:
      return 'white';

    // Gray and black colors
    case X11Colors.Black:
      return 'black';
    case X11Colors.DarkSlateGray:
      return 'darkslategray';
    case X11Colors.DimGray:
      return 'dimgray';
    case X11Colors.SlateGray:
      return 'slategray';
    case X11Colors.Gray:
      return 'gray';
    case X11Colors.LightSlateGray:
      return 'lightslategray';
    case X11Colors.DarkGray:
      return 'darkgray';
    case X11Colors.Silver:
      return 'silver';
    case X11Colors.LightGray:
      return 'lightgray';
    case X11Colors.Gainsboro:
      return 'gainsboro';

    // None
    case X11Colors.None:
      return 'none';
  }
}