works with commandline arugment for palette or palette defined in file.