swap function and lscolor