I think this was an important question: "Why is the case object and the case class that it extends not equal."
Using Scala 2.12.2
I added the following lines to your example, and now the object is equal to the class instance.
object Black extends Color(0x00000000) val black1 = Color(0x00000000) black1 == Black
res1: Boolean = true
Donald duck
source share