swatch function

Extract colors from an object