Summary

A 32bit color, commonly used by things like vertex buffers. The functionality on this is purposely left minimal so we're encouraged to use the regular Color struct.

Constructors

Color32 Initialize a color with each component set to given values, in range [0,255]

Fields

a The alpha/transparency color component, in range of 0 (fully transparent) to 255 (fully opaque).
b The blue color component, in range of 0-255.
g The green color component, in range of 0-255.
r The red color component, in range of 0-255.

Properties

Hex String representation of the form "#RRGGBB[AA]".
RawInt Integer representation of the form 0xAABBGGRR as used by native code.
Rgb String representation in the form of <see href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb">rgb</see>( r, g, b ) css function notation.
Rgba String representation in the form of <see href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgba">rgba</see>( r, g, b, a ) css function notation.
RgbaInt Integer representation of the form 0xRRGGBBAA.
RgbInt Integer representation of the form 0xRRGGBB.

Methods

ToColor Convert this object to Color.
Write Write this color to a binary writer.

Static Properties

Black A constant representing a fully opaque color black.
Transparent A constant representing a fully transparent color.
White A constant representing a fully opaque color white.

Static Methods

FromRgb Converts an integer of the form 0xRRGGBB into the color #RRGGBB with 100% alpha.
FromRgba Converts an integer of the form 0xRRGGBBAA into the color #RRGGBBAA.
Max Returns a new color with each component being the maximum of the 2 given colors.
Min Returns a new color with each component being the minimum of the 2 given colors.
Parse Parse a string to a color, in format "255 255 255 255" or "255,255,255". Alpha is optional.
Read Read a color from binary reader.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.