Support

Account

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

  • Here’s a quick workaround plugin:
    https://gist.github.com/squarecandy/036290389ba97434b17ab959a0ce9aef

    Throw that in your plugins folder, activate, and then use sqcdy_acf_rgb('my_color_field') in place of the_field('my_color_field') or sqcdy_get_acf_rgb('my_color_field') in place of get_field('my_color_field').

    It just outputs RRR,GGG,BBB so you can use the output in your css like this:

    color: rgb(<?php sqcdy_acf_rgb('my_color_field'); ?>);

    or with rgba like this:

    color: rgba(<?php sqcdy_acf_rgb('my_color_field'); ?>,0.5);