*/ public function toArray(): array; /** * Cast color object to hex encoded web color * * @return string */ public function toHex(string $prefix = ''): string; /** * Return array of all color channels * * @return array */ public function channels(): array; /** * Return array of normalized color channel values * * @return array */ public function normalize(): array; /** * Retrieve the color channel by its classname * * @param string $classname * @throws ColorException * @return ColorChannelInterface */ public function channel(string $classname): ColorChannelInterface; /** * Convert color to given colorspace * * @return ColorInterface */ public function convertTo(string|ColorspaceInterface $colorspace): self; /** * Determine if the current color is gray * * @return bool */ public function isGreyscale(): bool; /** * Determine if the current color is (semi) transparent * * @return bool */ public function isTransparent(): bool; /** * Determine whether the current color is completely transparent * * @return bool */ public function isClear(): bool; }