ConicGradient
Conic gradient implementation.
Represents a gradient that rotates around a center point, like a color wheel.
Also known as angular gradients.
Methods
public function addStop(ColorInterface $color, float $position): static
Parameters
| Name | Type | Default |
|---|---|---|
$color |
ColorInterface | - |
$position |
float | - |
colorWheel
static
public static function colorWheel(int $steps): ConicGradient
Create a color wheel conic gradient of evenly spaced OKLCH hues.
The wheel is closed by repeating the first hue at position 1.0.
Parameters
| Name | Type | Default |
|---|---|---|
$steps |
int | 12 |
public function getStops(): array
public function getType(): string
public function interpolate(float $position): ColorInterface
Parameters
| Name | Type | Default |
|---|---|---|
$position |
float | - |
public function toCss(string $colorSpace): string
Parameters
| Name | Type | Default |
|---|---|---|
$colorSpace |
string | null |
public function withAngle(float $angle): ConicGradient
Return a new instance with a different angle.
Parameters
| Name | Type | Default |
|---|---|---|
$angle |
float | - |
public function withPosition(string $position): ConicGradient
Return a new instance with a different position.
Parameters
| Name | Type | Default |
|---|---|---|
$position |
string | - |