IfSetColour

class IfSetColour : OutgoingGameMessage

If set-colour is used to set the colour of a text component.

Constructors

Link copied to clipboard
constructor(interfaceId: Int, componentId: Int, red: Int, green: Int, blue: Int)
constructor(combinedId: Int, red: Int, green: Int, blue: Int)
constructor(combinedId: Int, colour15BitPacked: Int)
constructor(interfaceId: Int, componentId: Int, color: Color)

A secondary constructor to build a colour from Color. This can be useful to avoid manual colour conversions, as 8-bit colours are typically used. This function will strip away the 3 least significant bits from the colours, as Jagex's colour format only expects 5 bits per colour, so small changes in tone may occur.

constructor(combinedId: Int, color: Color)

A secondary constructor to build a colour from Color. This can be useful to avoid manual colour conversions, as 8-bit colours are typically used. This function will strip away the 3 least significant bits from the colours, as Jagex's colour format only expects 5 bits per colour, so small changes in tone may occur.

Properties

Link copied to clipboard
val blue: Int

the value of the blue colour, ranging from 0 to 31 (inclusive)

Link copied to clipboard
open override val category: ServerProtCategory
Link copied to clipboard
Link copied to clipboard

the bitpacked combination of interfaceId and componentId.

Link copied to clipboard

the id of the component on which the text resides

Link copied to clipboard
val green: Int

the value of the green colour, ranging from 0 to 31 (inclusive)

Link copied to clipboard

the id of the interface on which the text resides

Link copied to clipboard
val red: Int

the value of the red colour, ranging from 0 to 31 (inclusive)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open fun estimateSize(): Int
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Turns the 15-bit RS RGB colour into a 24-bit normalized RGB colour.

Link copied to clipboard
open override fun toString(): String