SerenityJS
    Preparing search index...

    Represents a skin color, kept as a hex string (e.g. #ffb37b62) in memory. On the wire the color is an ARGB integer written in little-endian order.

    Hierarchy

    • DataType
      • SkinColor
    Index

    Constructors

    Methods

    Constructors

    • Default constructor for DataType.

      Parameters

      • ..._: unknown[]

      Returns SkinColor

    Methods

    • Read a value from the stream.

      Parameters

      • stream: BinaryStream

        The BinaryStream to read from.

      Returns string

      The value read from the stream.

    • Converts a hex color string to an ARGB value. Six digit colors (RGB, as used by the skin color in login data) are given full opacity.

      Parameters

      • value: string

        The hex color string to convert.

      Returns number

      The ARGB value of the color.

    • Write a value to the stream.

      Parameters

      • stream: BinaryStream

        The BinaryStream to write to.

      • value: string

        The value to write.

      Returns void