  There has been much research on the topic of finding a large rainbow matching
(with no two edges having the same color) in a properly edge-colored graph,
where a proper edge coloring is a coloring of the edge set such that no
same-colored edges are incident. Recently, Gao, Ramadurai, Wanless, and Wormald
proved that in every proper edge coloring of a graph with $q$ colors where each
color appears at least $q+o(q)$ times, there is always a rainbow matching using
every color. We strengthen this result by simultaneously relaxing two
conditions: (i) we lift the condition on the number of colors and allow any
finite number of colors and instead, put a weaker condition requiring the
maximum degree of the graph to be at most $q$, and (ii) we also relax the
proper coloring condition and require that the graph induced by each of the
colors have bounded degree. This strengthening resolves a natural question
inspired by the remarks made by Gao, Ramadurai, Wanless, and Wormald.
  As an application of this result, we show that for every proper edge coloring
of a graph with $2q+o(q)$ colors where each color appears at least $q$ times,
there is always a rainbow matching of size $q$. This can be seen as an
asymptotic version of a conjecture of Bar\'at, Gy\'arf\'as, and S\'ark\"ozy
restricted on simple graphs. We also provide a construction showing that having
$q+1$ colors is not enough, disproving a conjecture of Aharoni and Berger. As a
by-product of our techniques, we obtain a new asymptotic version of the
Brualdi--Ryser--Stein Conjecture, which is one of the central open questions in
combinatorics.
