Same name in other branches
- 8.x-2.x src/ColorInterface.php \Drupal\color_field\ColorInterface
Defines a common interface for color classes.
Hierarchy
- interface \Drupal\color_field\ColorInterface
Expanded class hierarchy of ColorInterface
All classes that implement ColorInterface
File
-
src/
ColorInterface.php, line 10
Namespace
Drupal\color_fieldView source
interface ColorInterface {
/**
* Get the color as a string.
*
* @return string
* The color as a string.
*/
public function toString() : string;
/**
* Get the color as a hex instance.
*
* @return \Drupal\color_field\ColorHex
* The color as a hex instance.
*/
public function toHex() : ColorHex;
/**
* Get the color as an RGB instance.
*
* @return \Drupal\color_field\ColorRGB
* The color as an RGB instance.
*/
public function toRgb() : ColorRGB;
/**
* Get the color as an HSL instance.
*
* @return \Drupal\color_field\ColorHSL
* The color as an HSL instance.
*/
public function toHsl() : ColorHSL;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ColorInterface::toHex | public | function | Get the color as a hex instance. | 4 |
ColorInterface::toHsl | public | function | Get the color as an HSL instance. | 4 |
ColorInterface::toRgb | public | function | Get the color as an RGB instance. | 4 |
ColorInterface::toString | public | function | Get the color as a string. | 4 |