Yellows look dingy

I recently washed some yellow stockings with something (I think a blue article of clothing?) and now they look super dingy, same thing with a bathing suit. What did i do wrong and how do i fix it? :,)