Same name and namespace in other branches
  1. 8.x-2.x src/ColorBase.php \Drupal\color_field\ColorBase::getOpacity() 1 comment

Get the opacity.

Return value

float The opacity value between 0 and 1.

10 calls to ColorBase::getOpacity()
ColorCMY::toCmyk in src/ColorCMY.php
ColorCMY::toRgb in src/ColorCMY.php
Get the color as an RGB instance.
ColorCMYK::toCmy in src/ColorCMYK.php
ColorHex::toRgb in src/ColorHex.php
Get the color as an RGB instance.
ColorHex::toString in src/ColorHex.php
A string representation of this color in the current format.

... See full list

File

src/ColorBase.php, line 193

Class

ColorBase
Base color class to ease implementations.

Namespace

Drupal\color_field

Code

public function getOpacity() : float {
    return $this->opacity;
}