Morphological transformations are always applied to individual color components separately. Or, in other words, each channel is treated as a separate image.
MorphologicalTransformation is one of the tools that will see a major revamp in the coming months. This includes the possibility to apply the transformation to lightness, luminance and chroma components, just as can be done in MultiscaleLinearTransform for example.