Skip to content

Override Palettes #53

Open
Open
@mike-sheppard

Description

@mike-sheppard

Hey @Log1x would it be possible to expose the Palette $colors via an ACF field setting so we can override them for specific fields?

We have a few elements on a new build where a custom palette is used for Taxonomy/Term accent colors but we don't want to add to the theme color palette that's used everywhere else.

I've been able to append colour using a hacky workaround add_theme_support('editor-color-palette', $tinted_palette); + check if on the correct admin URL, but would be great if we could do something like:

$tinted_palette = [
    [
        'name' => 'Magenta',
        'slug' => 'magenta',
        'color' => '#ff00ff',
    ], 
    ...
];

$terms_options->addField('term_accent_color', 'editor_palette', [
  'colors' => $tinted_palette,
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions