Ryan started slowly against Mayer, who used her trademark speed and ability off the jab to build an early lead.
The defending champion came back in the sixth round, landing a big left hand soon after.
Ryan had another big round in the eighth, but Mayer was up to the challenge of her biggest shots and stood firm.
Derby’s Ryan, who now has two defeats and seven wins, said the paint incident “threw me a bit off my game plan”.
“You saw at the start of the fight, I was handling her quite well on the jab,” she added.
“I was boxing her and then I started to pick it up. But then, I was obviously pushing it too hard.”
Mayer became a two-weight world champion with the victory, having previously been world champion at super-featherweight.
The American’s move to welterweight has been questioned because of the 17lb weight jump, but Mayer, who suffered a controversial defeat by Natasha Jonas in January and has now beaten one of the best welterweights in the division.
“[Ryan] just couldn’t handle my timing, so, I felt like I won the fight, and I’m just glad I got the right decision this time,” she said, referencing the Jonas bout.
“I want to finish what I started and go undisputed. I came very close at [super-featherweight].
“But my body outgrew that weight. I’m comfortable now. I feel like I’m stronger than ever. I’m still in my prime, as you can see.
“So I’m coming for the other champions.”