Tinkr2/4.2/AphelionCore/AphelionCore/Helpers/Colors.cs
/// <summary>
/// Creates a color from an RGB string
/// </summary>
/// <param name="colVal">String to convert to color. For example 255,0,0 will result in Red.</param>
/// <returns>Returns the color value.</returns>
Creates a color from an RGB string
Creates a color from an RGB string
public static Color FromString(string colVal)
      {
         string[] vals = colVal.Split(',');
         return ColorUtility.ColorFromRGB(byte.Parse(vals[0]), byte.Parse(vals[1]), byte.Parse(vals[2]));
      }
public static Color FromString ( string colVal ) { string [ ] vals = colVal . Split ( ' ' ) ; return ColorUtility . ColorFromRGB ( byte . Parse ( vals [ 0 ] ) , byte . Parse ( vals [ 1 ] ) , byte . Parse ( vals [ 2 ] ) ) ; }
Creates a color from an RGB string
Creates a color from an RGB string
Returns the color value.
Returns the color value .
colVal
string
String to convert to color. For example 255,0,0 will result in Red.
String to convert to color . For example 255 0 0 will result in Red .