interface ColorapiServiceInterface in Color API 8
Interface for the Colorapi Service class.
Hierarchy
- interface \Drupal\colorapi\Service\ColorapiServiceInterface
Expanded class hierarchy of ColorapiServiceInterface
All classes that implement ColorapiServiceInterface
2 files declare their use of ColorapiServiceInterface
- ColorForm.php in src/
Form/ ColorForm.php - HexColorConstraintValidator.php in src/
Plugin/ Validation/ Constraint/ HexColorConstraintValidator.php
File
- src/
Service/ ColorapiServiceInterface.php, line 8
Namespace
Drupal\colorapi\ServiceView source
interface ColorapiServiceInterface {
/**
* Helper function to convert hex to rgb.
*
* @param string $hex
* The color in hexadecimal string format.
* @param string $colorIndex
* The color value to return, must be one of:
* - red
* - green
* - blue.
*/
public function hexToRgb($hex, $colorIndex);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ColorapiServiceInterface:: |
public | function | Helper function to convert hex to rgb. | 1 |