1
0
mirror of https://github.com/Intervention/image.git synced 2025-02-22 05:12:30 +01:00

Add prefix parameter

This commit is contained in:
Oliver Vogel 2023-10-22 13:03:52 +02:00
parent 03a8ede2c6
commit 08619025e6
2 changed files with 3 additions and 3 deletions

View File

@ -38,9 +38,9 @@ class Color implements ColorInterface
})->handle($input);
}
public function toHex(): string
public function toHex(string $prefix = ''): string
{
return $this->convertTo(RgbColorspace::class)->toHex();
return $this->convertTo(RgbColorspace::class)->toHex($prefix);
}
public function channels(): array

View File

@ -39,7 +39,7 @@ interface ColorInterface
*
* @return string
*/
public function toHex(): string;
public function toHex(string $prefix = ''): string;
/**
* Return array of all color channels