public function ColorHex::resolve in Open Social 10.3.x
Same name and namespace in other branches
- 10.2.x modules/social_features/social_branding/src/Plugin/GraphQL/DataProducer/ColorHex.php \Drupal\social_branding\Plugin\GraphQL\DataProducer\ColorHex::resolve()
Returns the Hex color.
Parameters
\Drupal\social_branding\Wrappers\Color $color: The branding color.
Return value
string The branding color CSS codification.
File
- modules/
social_features/ social_branding/ src/ Plugin/ GraphQL/ DataProducer/ ColorHex.php, line 37
Class
- ColorHex
- The Hex color.
Namespace
Drupal\social_branding\Plugin\GraphQL\DataProducerCode
public function resolve(Color $color) : string {
return $color
->hexRgb();
}