Support closures as palettes_callback.