I am plotting multiple objects, both consisting of multiple straight lines. To do so, I use a list of colors and assign one to each object. The desired result looks like this:

I am doing this with the command plt.plot, providing a start and end point, and a color.
While trying to get to this result, I made a mistake, and instead of names like 'pink', I provided values like (0, 0.75, 0).
Which resulted in this:

Why does matplotlib behave this way? I would like to understand how it comes that each segment has its own color, seemingly chosen at random, when I have always provided the same incorrect input.
I was unable to find documentation of the behaviour when no correct input value is passed. If there is documentation, a quote of the relevant part would already constitute an answer if matplotlib actually just chooses at random every time.
The same behaviour happens when I pass False instead of a color.
MCVE:
import matplotlib.pyplot as plt
# Line in black
plt.plot([-1,-1], [-1,1], 'k')
# Line in bad color
plt.plot([0,0],[-1,1], False)
# Line in same bad color
plt.plot([1,1],[-1,1], False)
# Line in other bad color
plt.plot([2,2],[-1,1], (0,0.75,0))
# Line in same other bad color
plt.plot([3,3],[-1,1], (0,0.75,0))
plt.show()
Note:
I am not looking for how to get my desired result by passing a constant color. I managed that. But on the way there, I encountered this behaviour, which I'd like to understand.
Based on the comments, it seems likely that there is some documented and well-known functionality in pyplot that simply uses a color cycle and takes the next color in it whenever no valid color is provided. I am not able to find documentation on that though, so I would like either some documentation quote, or the answer that this is undocumented behaviour, or something along those lines.
It is also worth pointing out that something in the middle of the image was also drawn when I was using invalid color parameters, but not when using correct values. Why?



