Where does conversion to ARGB take place for Indexed Colour Formats?

For indexed colours (I’m using I8)- where exactly in the render process does the buffer array get swapped from index value to ARGB value?

I’m looking to make some custom changes at this step.

Is this what you’re looking for?