You are here

protected function StyleBase::getColor in GridStack 8.2

Checks for valid color excluding black (#000000) by design.

1 call to StyleBase::getColor()
Background::getBackgroundColor in src/Plugin/gridstack/stylizer/Background.php
Returns the background colors grouped by the given key, w/o text colors.

File

src/Plugin/gridstack/stylizer/StyleBase.php, line 184

Class

StyleBase
Provides the base styles.

Namespace

Drupal\gridstack\Plugin\gridstack\stylizer

Code

protected function getColor($key, array $settings = []) {
  $colors = $this
    ->getColors($settings);
  return !empty($colors[$key]) && $colors[$key] != '#000000' ? $colors[$key] : FALSE;
}