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:
parent
03a8ede2c6
commit
08619025e6
@ -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
|
||||
|
@ -39,7 +39,7 @@ interface ColorInterface
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHex(): string;
|
||||
public function toHex(string $prefix = ''): string;
|
||||
|
||||
/**
|
||||
* Return array of all color channels
|
||||
|
Loading…
x
Reference in New Issue
Block a user