From Deep Sea Knowledge
Jump to navigation Jump to search

sead::Color4u8 is a helper class that contains a single RGBA color, with each value being a u8, which is where the class name comes from.


The class contains 4 members of type u8, which represent the Red, Green, Blue, and Alpha components. Due to the type of each component, this class is able to perform more binary operations easily.

The following operators are supported:

  • +=
  • -=
  • *=
  • /=
  • |=
  • &=

setf(float r, float g, float b, float a)

Takes the four floats given, converts them to u8, and stores each color into their respective members.

setLerp(sead::Color4f const &color1, sead::Color4f const &color2, float interpolation)

Interpolates between the referenced values, with the float being the interpolation value.

setGammaCollection(sead::Color4u8 const &, float)


lerp(sead::Color4u8 const &, sead::Color4u8 const &, float)