Guest User

Untitled

a guest
May 26th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.60 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Runtime.InteropServices;
  6.  
  7. namespace GameStructure
  8. {
  9.     public struct Color
  10.     {
  11.         public float Red { get; set; }
  12.         public float Green { get; set; }
  13.         public float Blue { get; set; }
  14.         public float Alpha { get; set; }
  15.  
  16.         public const Color BLACK = new Color(0, 0, 0, 1);
  17.         public const Color RED = new Color(1, 0, 0, 1);
  18.         public const Color GREEN = new Color(0, 1, 0, 1);
  19.         public const Color BLUE = new Color(0, 0, 1, 1);
  20.         public const Color WHITE = new Color(1, 1, 1, 1);
  21.         public const Color PINK = new Color(1, .75f, .793f, 1);
  22.         public const Color PURPLE = new Color(.5f, 0, .5f, 1);
  23.         public const Color INDIGO = new Color(.293f, 0, .508f, 1);
  24.         public const Color TURQUOISE = new Color(0, .961f, 1, 1);
  25.         public const Color TEAL = new Color(0, .5f, .5f, 1);
  26.         public const Color SEAGREEN = new Color(.328f, 1, .621f, 1);
  27.         public const Color YELLOW = new Color(1, 1, 0, 1);
  28.         public const Color GOLD = new Color(1, .84f, 0, 1);
  29.         public const Color ORANGE = new Color(1, .645f, 0, 1);
  30.         public const Color MAROON = new Color(.5f, 0, 0, 1);
  31.         public const Color DARKGRAY = new Color(.5f, .5f, .5f, 1);
  32.         public const Color GRAY = new Color(.75f, .75f, .75f, 1);
  33.  
  34.         public Color(float r, float g, float b, float a)
  35.             : this()
  36.         {
  37.             Red = r;
  38.             Green = g;
  39.             Blue = b;
  40.             Alpha = a;
  41.         }
  42.  
  43.     }
  44. }
Add Comment
Please, Sign In to add comment