Same name in other branches
  1. 3.0.x src/ColorCMY.php \Drupal\color_field\ColorCMY::toString()

A string representation of this color in the current format.

Parameters

bool $opacity: Whether or not to display the opacity.

Return value

string The color in format: #RRGGBB.

Overrides ColorInterface::toString

File

src/ColorCMY.php, line 89

Class

ColorCMY
ColorCMY represents the CMY color format.

Namespace

Drupal\color_field

Code

public function toString($opacity = TRUE) {
    return $this->toHex()
        ->toString($opacity);
}