Table of Contents

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

r byte
g byte
b byte
a byte

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

color Color32

The Color32 value to convert.

Returns

string

Returns a string containing the hexadecimal value.

Equals(Color32)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(Color32 other)

Parameters

other Color32

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

HexToColor32(string)

Converts a Hexadecimal value to a Color32 value.

public static Color32 HexToColor32(string hex)

Parameters

hex string

The hexadecimal value to convert.

Returns

Color32

Returns a hexadecimal value converted to Color32.

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)

Explicit conversion operator.(Color32 to string)

public static explicit operator string(Color32 c)

Parameters

c Color32

Object to be converted.

Returns

string

explicit operator Color32(string)

Explicit conversion operator.(string to Color32)

public static explicit operator Color32(string stg)

Parameters

stg string

Object to be converted.

Returns

Color32

implicit operator Color32(ColorF)

Implicit conversion operator.(ColorF to Color32)

public static implicit operator Color32(ColorF c)

Parameters

c ColorF

Object to be converted.

Returns

Color32

implicit operator Color32(Vector4D)

Implicit conversion operator.(Vector4D to Color32)

public static implicit operator Color32(Vector4D c)

Parameters

c Vector4D

Object to be converted.

Returns

Color32

implicit operator Color32(Color)

Implicit conversion operator.(Godot.Color to Color32)

public static implicit operator Color32(Color c)

Parameters

c Color

Object to be converted.

Returns

Color32