I wouldn't modify the primary key field. I would suggest a second match field to match the color, then you could display all color by just matching the primary key field or just one color by matching the primary key and color field.
That's exactly what I wanna do, but I am using the auto enter serial, which does not allow a repeated number for the same material.
Nor should it it allow a repeated number.
Just use auto-entered serial numbers that are unique, period. Don't try to set up a "sub serial" as you don't need it.