Same name and namespace in other branches
  1. 3.0.x src/ColorCMYK.php \Drupal\color_field\ColorCMYK::__construct()

Create a new CMYK color.

Parameters

float $cyan: The cyan.

float $magenta: The magenta.

float $yellow: The yellow.

float $key: The key (black).

float $opacity: The opacity.

File

src/ColorCMYK.php, line 52

Class

ColorCMYK
ColorCMYK represents the CMYK color format.

Namespace

Drupal\color_field

Code

public function __construct($cyan, $magenta, $yellow, $key, $opacity) {
    $this->cyan = $cyan;
    $this->magenta = $magenta;
    $this->yellow = $yellow;
    $this->key = $key;
    $this->opacity = floatval($opacity);
}