Table of contents
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
- since: 2026-07-17
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2015-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-color
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