Example #1
0
        private Color GetColor(BackgroundAttributeColor color)
        {
            switch (color)
            {
            case BackgroundAttributeColor.Red:
                return(new Color32(255, 0, 63, 255));

            case BackgroundAttributeColor.Pink:
                return(new Color32(255, 66, 160, 255));

            case BackgroundAttributeColor.Orange:
                return(new Color32(255, 128, 0, 255));

            case BackgroundAttributeColor.Yellow:
                return(new Color32(255, 211, 0, 255));

            case BackgroundAttributeColor.Green:
                return(new Color32(102, 255, 0, 255));

            case BackgroundAttributeColor.Blue:
                return(new Color32(0, 135, 189, 255));

            case BackgroundAttributeColor.Violet:
                return(new Color32(127, 0, 255, 255));

            default:
                return(Color.white);
            }
        }
 public BackgroundColorAttribute(BackgroundAttributeColor color = BackgroundAttributeColor.Yellow)
 {
     this.Color = color;
 }