Skip to content

Duotone using theme/Style colors does not update when theme/Style colors are changed #49595

Closed

Description

@jordesign

Description

What I expect

When a duotone filter is using the theme's preset colors (eg. Contrast/Primary/Secondary set from Global Styles) I expect the duotone to update when I make changes to the color presets.

What happens

Instead when changing the preset colors - the duotone filter retains the old colors and shows them as hex values instead of the preset name.

Step-by-step reproduction instructions

  1. Set up an image/cover block with the Duotone Filter. For the highlight and shadow values - select preset colors.
  2. Change the preset colors in Site Editor > Styles > Colors
  3. Return to the image/cover block and see that the duotone filter has not updated.

Screenshots, screen recording, code snippet

duotone-color-palette.mov

Environment info

  • WP6.2 & GB15.4
  • TwentyTwentyThree

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Type] Bug
    Global Styles
    on Apr 4, 2023
  2. jordesign commented on Apr 4, 2023

    @jordesign
    ContributorAuthor

    For additional context it seems that is related to the Duotone values being stores as hex instead of CSS variables.
    Related issue here - but specifically related to Style variations:
    #46547

    And more related to the Social Icons block:
    #35480
    #36462

    There's also an existing PR for switching to CSS Custom properties for Duotone
    #42870

  3. jordesign commented on Apr 4, 2023

    @jordesign
    ContributorAuthor

    more additional context....

    I ran into this issue when trying to create a Block Pattern for submission. The use case being that it would be great to have a pattern be inserted and have the Duotone automatically reference the user's preset colors when inserted.

  4. annezazu commented on Apr 5, 2023

    @annezazu
    Contributor

    @MaggieCabrera and @ajlende curious what you all think here!

  5. MaggieCabrera commented on Apr 5, 2023

    @MaggieCabrera
    Contributor

    Yeah, I believe it's because are saved as hex, when that gets solved we should check that this issue gets resolved as well

  6. annezazu commented on Sep 25, 2026

    @annezazu
    Contributor

    Since there's now a dedicated spot to manage duotone, I tried to test this again and found it works!

    duotone.changing.mov
    duotone.replicating.mov

    I tried two different approaches to double check. If I have the steps wrong or this is still an issue, let me know. We can always re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global Styles[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions