Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 30-May-20 22:11pm

1 solution

 
Share this answer
 
Comments
Maciej Los 31-May-20 14:02pm    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900