diff --git a/packages/block-editor/src/components/colors/use-colors.js b/packages/block-editor/src/components/colors/use-colors.js index b8d9d18f2a71a3..2e423fdbad8c45 100644 --- a/packages/block-editor/src/components/colors/use-colors.js +++ b/packages/block-editor/src/components/colors/use-colors.js @@ -199,7 +199,15 @@ export default function __experimentalUseColors( detectedBackgroundColorRef.current = backgroundColor; return { backgroundColor }; } )( () => <> ), - [ attributes ] + [ + colorConfigs.reduce( + ( acc, colorConfig ) => + `${ acc } | ${ attributes[ colorConfig.name ] } | ${ + attributes[ camelCase( `custom ${ colorConfig.name }` ) ] + }`, + '' + ), + ] ); return useMemo( () => { @@ -272,5 +280,5 @@ export default function __experimentalUseColors( ), BackgroundColorDetector, }; - }, [ attributes, setAttributes, ...deps ] ); + }, [ attributes, setAttributes, detectedBackgroundColorRef.current, ...deps ] ); }