Retrieve Materials RGB code

Hey guys! So i have a material, but this material has a color sample with 255 different colors, but i need the RGB codes for that selected color thats connected into the emessive.

the color is selected by custom stencil value

so how do i retrieve this? any ways?

I may be wrong, but I don’t think it’s possible to get RGB information this way. I have had to use dynamic material instances with color as vector parameter values to use and retrieve RGB information. If there is a way to retrieve the color more directly I would love to know.

But this is strange, because i have a color pallet, with designated spots for colors, (255x1) lets say 72, there should be a way to retrieve this from the color pallet? Its weird…

How do you setup a dynamic material instances with color as vector parameter?