contiene no es una función javascript

Try o.color.includes(this.color) instead.

"contains" is deprecated. You should use "includes" instead.
serhii.nahornyi