bring the output of compositing into blender material node editor
Compositing is a process that happens after rendering. Materials are input for rendering. Basically it is not possible to change these steps expect when rendering out to an image and then import it in a material node.

This fixed pipeline is normal in animations and vfx. Compositing in these kings of pipelines are used to tweak the renderings without doing full re-renders.