HEXAColor

@Serializable
value class HEXAColor(val hexaUInt: UInt) : Comparable<HEXAColor> (source)

Wrapper for RGBA colors. Receiving UInt in main constructor. Each part in main constructor configured with 0x00 - 0xff range. Examples:

  • Red: 0xff0000ffu

  • Red (0.5 capacity): 0xff000088u

Anyway it is recommended to use

Parameters

hexaUInt

rgba UInt in format 0xFFEEBBAA where FF - red, EE - green, BB - blue` and AA - alpha

Constructors

Link copied to clipboard
constructor(r: Int, g: Int, b: Int, a: Int)
constructor(r: Int, g: Int, b: Int, aOfOne: Float = 1.0f)
constructor(hexaUInt: UInt)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val a: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val b: Int
Link copied to clipboard
val g: Int
Link copied to clipboard
val hex: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val r: Int
Link copied to clipboard
val rgb: String
Link copied to clipboard
Link copied to clipboard
val rgbInt: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun compareTo(other: HEXAColor): Int
Link copied to clipboard
fun copy(r: Int = this.r, g: Int = this.g, b: Int = this.b, aOfOne: Float = this.aOfOne): HEXAColor
fun copy(r: Int = this.r, g: Int = this.g, b: Int = this.b, a: Int): HEXAColor
Link copied to clipboard
open override fun toString(): String