<?php
namespace App;

$colors = get_gutenberg_colors_matrix();

$display_colors = '<style>';

foreach ($colors as $number => $item) {

    $color = get_theme_mod('muy_global_color_' . $number) ?: $item['default'];

    $display_colors .= '.has-color-'.$number.'-color {';
    $display_colors .= 'color: '.$color. '!important;}';
    $display_colors .= '.has-color-'.$number.'-background-color {';
    $display_colors .= 'background-color: '.$color.'!important;}';

}
$display_colors .= '</style>';

echo $display_colors;

?>