You are here

interface ColorapiServiceInterface in Color API 8

Interface for the Colorapi Service class.

Hierarchy

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\Service
View 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

Namesort descending Modifiers Type Description Overrides
ColorapiServiceInterface::hexToRgb public function Helper function to convert hex to rgb. 1