Support

Account

Home Forums Feature Requests Color Picker values Reply To: Color Picker values

  • I’ve used the following workaround (in this specific example I was forming it for use echoed as inline CSS):

    – 2 fields, one the colour picker and the other for a number for opacity (0 to 1 in 0.1 increments)

    – In PHP convert the hex colour value to an RGB and then tack the opacity value on the end, like so:

    
    list($r, $g, $b) = sscanf($colour_field_value, "#%02x%02x%02x");
    $rgba_colour = 'rgba(' . $r . ',' . $g . ',' . $b . ',' . $opacity_field_value .')';