adding to color palette function and printing elapsed time
use multithreading for faster image processing