Same name in other branches
- 3.0.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 8
Namespace
Drupal\color_fieldView source
interface ColorInterface {
/**
* Get the color as a string.
*
* @return string
* The color as a string.
*/
public function toString();
/**
* Get the color as a hex instance.
*
* @return \Drupal\color_field\ColorHex
* The color as a hex instance.
*/
public function toHex();
/**
* Get the color as a RGB instance.
*
* @return \Drupal\color_field\ColorRGB
* The color as a RGB instance.
*/
public function toRgb();
/**
* Get the color as a HSL instance.
*
* @return \Drupal\color_field\ColorHSL
* The color as a HSL instance.
*/
public function toHsl();
// Public function toHSV();
// public function toCMYK();
// public function toCSS();
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ColorInterface::toHex | public | function | Get the color as a hex instance. | 5 |
ColorInterface::toHsl | public | function | Get the color as a HSL instance. | 5 |
ColorInterface::toRgb | public | function | Get the color as a RGB instance. | 5 |
ColorInterface::toString | public | function | Get the color as a string. | 5 |