are these even necessary? I thought removing 'code' below as an inversion trigger would do it.

In any case, my earlier point was that 'rgb' isn't sufficient since the type list is not just rgb but hsl, hsv, cmyk, etc.