public function JQueryColorpickerServiceInterface::formatColor in Jquery Colorpicker 8
Formats colors into a consistent format for database storage.
Turns non-scalar values into an empty string. Removes the leading # (hash) from the given value if one exists at the start of the string.
Parameters
mixed $color: The value to be formatted.
Return value
string The formatted string.
1 method overrides JQueryColorpickerServiceInterface::formatColor()
- JQueryColorpickerService::formatColor in src/
Service/ JQueryColorpickerService.php - Formats colors into a consistent format for database storage.
File
- src/
Service/ JQueryColorpickerServiceInterface.php, line 22
Class
- JQueryColorpickerServiceInterface
- Interface for jQuery Colorpicker service.
Namespace
Drupal\jquery_colorpicker\ServiceCode
public function formatColor($color);