<?php

/**
 * Add tailwind colors to Gutemberg
 */
function add_tailwind_colors_to_gutenberg_palette()
{
    add_theme_support('editor-color-palette', array(
        array(
            'name' => __('Gray', 'laurentperrier'),
            'slug' => 'gray',
            'color' => '#9CA3AF',
        ),
        array(
            'name' => __('Gray 100', 'laurentperrier'),
            'slug' => 'gray-100',
            'color' => '#f8f9fb',
        ),
        array(
            'name' => __('Gray 200', 'laurentperrier'),
            'slug' => 'gray-200',
            'color' => '#eef2f7',
        ),
        array(
            'name' => __('Gray 300', 'laurentperrier'),
            'slug' => 'gray-300',
            'color' => '#e2e8f0',
        ),
        array(
            'name' => __('Gray 400', 'laurentperrier'),
            'slug' => 'gray-400',
            'color' => '#cbd5e0',
        ),
        array(
            'name' => __('Gray 500', 'laurentperrier'),
            'slug' => 'gray-500',
            'color' => '#9ca3af',
        ),
        array(
            'name' => __('Gray 600', 'laurentperrier'),
            'slug' => 'gray-600',
            'color' => '#6b7280',
        ),
        array(
            'name' => __('Gray 700', 'laurentperrier'),
            'slug' => 'gray-700',
            'color' => '#4b5563',
        ),
        array(
            'name' => __('Gray 800', 'laurentperrier'),
            'slug' => 'gray-800',
            'color' => '#374151',
        ),
        array(
            'name' => __('Gray 900', 'laurentperrier'),
            'slug' => 'gray-900',
            'color' => '#1f2937',
        ),
        array(
            'name' => __('Primary', 'laurentperrier'),
            'slug' => 'primary',
            'color' => '#1E70AF',
        ),
        array(
            'name' => __('Secondary', 'laurentperrier'),
            'slug' => 'secondary',
            'color' => '#F6B026',
        ),
    ));
}
add_action('after_setup_theme', 'add_tailwind_colors_to_gutenberg_palette');
