Struct Color32
- Namespace
- Cobilas.GodotEngine.Utility
- Assembly
- com.cobilas.godot.utility.dll
Represents an ARGB value between (0 and 255).
[Serializable]
public struct Color32 : IEquatable<Color32>
- Implements
- Inherited Members
Constructors
Color32(ColorF)
Creates a new instance of this object.
public Color32(ColorF color)
Parameters
color
ColorF
Color32(Vector4D)
Creates a new instance of this object.
public Color32(Vector4D color)
Parameters
color
Vector4D
Color32(Color)
Creates a new instance of this object.
public Color32(Color color)
Parameters
color
Color
Color32(byte, byte, byte, byte)
Creates a new instance of this object.
public Color32(byte r, byte g, byte b, byte a)
Parameters
Properties
A
Represents the alpha value.
public byte A { readonly get; set; }
Property Value
- byte
Allows you to set the alpha value.
B
Represents the value blue.
public byte B { readonly get; set; }
Property Value
- byte
Allows you to set the value blue.
G
Represents the value green.
public byte G { readonly get; set; }
Property Value
- byte
Allows you to set the value green.
R
Represents the value red.
public byte R { readonly get; set; }
Property Value
- byte
Allows you to set the value red.
Methods
Color32ToHex(Color32)
Converts a Color32 value to hexadecimal.
public static string Color32ToHex(Color32 color)
Parameters
Returns
Equals(Color32)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Color32 other)
Parameters
other
Color32An object to compare with this object.
Returns
HexToColor32(string)
Converts a Hexadecimal value to a Color32 value.
public static Color32 HexToColor32(string hex)
Parameters
hex
stringThe hexadecimal value to convert.
Returns
ToString()
Returns the fully qualified type name of this instance.
public override readonly string ToString()
Returns
- string
The fully qualified type name.
Operators
explicit operator string(Color32)
public static explicit operator string(Color32 c)
Parameters
c
Color32Object to be converted.
Returns
explicit operator Color32(string)
public static explicit operator Color32(string stg)
Parameters
stg
stringObject to be converted.
Returns
implicit operator Color32(ColorF)
public static implicit operator Color32(ColorF c)
Parameters
c
ColorFObject to be converted.
Returns
implicit operator Color32(Vector4D)
public static implicit operator Color32(Vector4D c)
Parameters
c
Vector4DObject to be converted.
Returns
implicit operator Color32(Color)
Implicit conversion operator.(Godot.Color to Color32)
public static implicit operator Color32(Color c)
Parameters
c
ColorObject to be converted.