Bugs I see repeatedly:
Forgetting the outer loop. You only check one component, miss conflicts in others.
Wrong index bounds. Off-by-one errors with -indexed graphs.
Not building the graph correctly. Forgetting edges are bidirectional.
Checking color before assignment.
The order matters: check if colored, then check if conflict, then assign if uncolored.
Using as "unvisited" when is also a valid color. Use for unvisited.