share colour scale generator function