Is there a way to get of list of colours that are in the different colour pallets, like 16 colours, 256 colours, 16-bit, 24-bit and 32-bit? The full picture is that I need a function that converts a colour to colour from the palate.
What I have tried:
My current plan is to loop through the pallet and get the distance between the original colour and the colour from the pallet (which I already found a method to complete that step), use the distance to get the closest colour, and then return the new colour. I also found a list of the colours that are in the 16 colours palette and so for now I created an array with those 16 colours, but of course I can't do that for palettes with higher number of colours, because speed will be greatly affected. Does anyone have any idea for a better method and where I can get a list of the colours in each palette?