raw = $raw; } public function getRaw(): int { return $this->raw; } public function getRed(): int { return ($this->raw >> 16) & 0xFF; } public function getGreen(): int { return ($this->raw >> 8) & 0xFF; } public function getBlue(): int { return $this->raw & 0xFF; } public function toString(): IString { return new AString('#' . str_pad(dechex($this->raw & 0xFFFFFF), 6, '0', STR_PAD_LEFT)); } }