ColorModelType

Backed enum for the color model type. Each backing value is the string returned by Model::getType().

Namespace: Com\Tecnick\Color

Backing type: string

File: ColorModelType.php line 37

Backed enum for the color model type. Each backing value is the string returned by Model::getType().

Tags

Cases

Gray

File: ColorModelType.php line 39

Rgb

File: ColorModelType.php line 41

Hsl

File: ColorModelType.php line 43

Cmyk

File: ColorModelType.php line 45

Lab

File: ColorModelType.php line 47

Methods

fromLoose()

File: ColorModelType.php line 59

public static fromLoose(string|self $value) : self

Accepts the type string (case-insensitive) or an enum case, which is returned unchanged.

Parameters

  • $value : string|self: Color model type or enum case.

Tags

  • throws: Exception if the value does not match a known color model type.

Return values

self