public function BackgroundImageManagerInterface::colorSampleFile in Background Image 8
Same name and namespace in other branches
- 2.x src/BackgroundImageManagerInterface.php \Drupal\background_image\BackgroundImageManagerInterface::colorSampleFile()
- 2.0.x src/BackgroundImageManagerInterface.php \Drupal\background_image\BackgroundImageManagerInterface::colorSampleFile()
Samples the average color of an image file.
Parameters
\Drupal\file\FileInterface $file: A File entity 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::colorSampleFile()
- BackgroundImageManager::colorSampleFile in src/
BackgroundImageManager.php - Samples the average color of an image file.
File
- src/
BackgroundImageManagerInterface.php, line 56
Class
Namespace
Drupal\background_imageCode
public function colorSampleFile(FileInterface $file = NULL, $default = NULL);