Creates a Color instance.

Parameters

string $color The color.:

float $opacity The opacity.:

File

src/Color.php, line 31

Class

Color

Namespace

Drupal\color_field

Code

public function __construct($color, $opacity) {
    $this->color = $color;
    $this->opacity = $opacity;
}