Tries to convert an incoming string into RGBA values.
Description
Direct port of colord’s parse function simplified for our use case. This version only supports string parsing and only returns RGBA values.
Parameters
$inputstringrequired- The string to parse.
Source
private static function colord_parse( $input ) {
$result = self::colord_parse_hex( $input );
if ( ! $result ) {
$result = self::colord_parse_rgba_string( $input );
}
if ( ! $result ) {
$result = self::colord_parse_hsla_string( $input );
}
return $result;
}
Changelog
| Version | Description |
|---|---|
| 6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.