I am trying to process an x-ray image.

The challenge is to draw each bone in a different color. I used canny filter, otsu binarization and Morphological Image Processing, such as erosion, to get this effect:

Now I need to find an algorithm for coloring each bone. I was thinking about using labels of related components or filling the flood, but these algorithms require a closed area that will be filled with color, but there is also an “almost closed” area for color in my image. I tried to "close every bone" with Dilation, but that didn't work.
And now I completely do not know what to do with it and how colored bones are.