public function ColorHex::toHsl in Color Field 8.2
Get the color as a HSL instance.
Return value
\Drupal\color_field\ColorHSL The color as a HSL instance.
Overrides ColorInterface::toHsl
File
- src/
ColorHex.php, line 90
Class
- ColorHex
- Hex represents the Hex color format.
Namespace
Drupal\color_fieldCode
public function toHsl() {
return $this
->toRGB()
->toHsl();
}