WPDev.one
Core Function
View Source on Trac ↗

rest_parse_hex_color()

rest_parse_hex_color( mixed $color )

Parses a 3 or 6 digit hex color (with #).

Parameters 1 required

Name / Type Description
$color
string

3 or 6 digit hex color (with #).

Required

Return Value

((string)
| false) Color value on success, false on failure.

Function Information

Since Version
5.4.0
Source File
wp-includes/rest-api.php
Advertisement