public function BackgroundImageManagerInterface::colorSampleImage in Background Image 2.0.x
Same name and namespace in other branches
- 8 src/BackgroundImageManagerInterface.php \Drupal\background_image\BackgroundImageManagerInterface::colorSampleImage()
- 2.x src/BackgroundImageManagerInterface.php \Drupal\background_image\BackgroundImageManagerInterface::colorSampleImage()
Samples the average color of an image file.
Parameters
\Drupal\Core\Image\ImageInterface $image: An Image object.
string $default: The default lowercase simple color (HEX) representation to use if unable to sample the image.
Return value
string The lowercase simple color (HEX) representation of the sampled image.
1 method overrides BackgroundImageManagerInterface::colorSampleImage()
- BackgroundImageManager::colorSampleImage in src/
BackgroundImageManager.php - Samples the average color of an image file.
File
- src/
BackgroundImageManagerInterface.php, line 70
Class
Namespace
Drupal\background_imageCode
public function colorSampleImage(ImageInterface $image, $default = NULL);