Converts a names factor to a p2 selection object if colors are provided it assigns those, otherwise uses a rainbow palette
Useful links