diff --git a/Source/Engine/Core/Math/Color32.cs b/Source/Engine/Core/Math/Color32.cs index c8421715c..88d0b9fd2 100644 --- a/Source/Engine/Core/Math/Color32.cs +++ b/Source/Engine/Core/Math/Color32.cs @@ -244,13 +244,21 @@ namespace FlaxEngine return new Color(c.R / 255f, c.G / 255f, c.B / 255f, c.A / 255f); } + /// + /// Performs an explicit conversion from to . + /// + /// The value. + /// The result of the conversion. + public static explicit operator Int4(Color32 value) + { + return new Int4(value.R, value.G, value.B, value.A); + } + /// /// Performs an explicit conversion from to . /// /// The color. - /// - /// The result of the conversion. - /// + /// The result of the conversion. public static explicit operator Vector4(Color32 c) { return new Vector4(c.R / 255f, c.G / 255f, c.B / 255f, c.A / 255f);