change swatch function to clpng
added color swatch extraction function
fix typo