You are here

public function BackgroundImageManagerInterface::colorSampleFile in Background Image 8

Same name and namespace in other branches
  1. 2.x src/BackgroundImageManagerInterface.php \Drupal\background_image\BackgroundImageManagerInterface::colorSampleFile()
  2. 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

BackgroundImageManagerInterface

Namespace

Drupal\background_image

Code

public function colorSampleFile(FileInterface $file = NULL, $default = NULL);