How to use reference image in indexed color mode?

I would like to use indexed color mode, and also use a reference image. The problem is the indexed colors in the reference image are not close to the original. How does aseprite handle indexing the colors of a reference image? Is there a way to tell aseprite to find closest color match?

Might sound unrelated but what is the specific reason you need to use indexed mode though?

Firstly I fixed the issue, and just had to re-add the reference, and it correctly updated the colors.

@Pancake to answer you question, I like using indexed colors when using limited pallet, so I can change the colors globally after the fact. But yeah it may turn out not to be a good idea.

Personally I just use rgb with my Palette and only switch to indexed when I need to move the colors around and stuff, I suggest you do that too, will be much easier for you to work with anything