Laws requiring different colored vessels for different fuels must be state specific.
Not only have I never used anything but a red container for any type of fuel, I have never, to my recollection, seen a yellow fuel container.
I would have no idea where to purchase one.
I had purchased a blue container marked "Kerosine" many years ago. I used it to carry water, as confusing a fuel container,
with a water container,
on a cold morning, in a national park, trying to make coffee by boiling white gas......nevermind
Don't ask me how I know
To answer the question at hand, I would not think twice about using an empty container for filling with any type of fuel, regardless of what was in it previously.
Understand that there is only one definition for "empty".