NEW YORK — Major League Baseball has ruled that Houston Astros outfielder Taylor Trammell’s bat, which was confiscated in the ninth inning of Thursday night’s game against the New York Yankees, was technically illegal.

But the league office determined that Trammell’s bat did not give him a competitive advantage, and the umpires treated the situation like “an impermissible glove color or design and told the player that he was no longer permitted to use the bat,” according to a major-league source.

MLB’s bat supplier regulations, shared with The Athletic, state that a two-color bat must be divided into two sections, each of one solid color. The dividing point between each of the color sections must start 18 inches from the knob end of the bat, or next to the 1-inch solid color ring, if applicable. Multi-colored bats are only permitted if the color transition occurs at the 18-inch mark from the knob.

Trammell had discoloration on the barrel of his bat, which prompted Yankees manager Aaron Boone to ask the umpires to examine it after the Astros outfielder hit a double.

“Frankly, that was something hard for me to do, because I don’t think Taylor was up to anything — I really don’t,” Boone said Friday. “But it was brought to my attention and something that looked not right and, I think, not within the rules. So in the moment, I felt a duty to at least check in for my team. I’m frankly satisfied with the ruling, the explanation, what have you. I don’t think Taylor was up to no good at all. I do feel like in the moment that I had a duty to at least check.”

On Friday, both Trammell and Astros manager Joe Espada said they heard from MLB and considered the matter in the past.

“I appreciated the explanation,” Trammell said. “Was kind of in the dark for a little bit. But the biggest thing is the discoloration of the bat. We see it a lot with some guys when they have a wristband on or something like that and they just have to take it off. It’s nothing crazy. Didn’t impact the ball or anything like that, was more so of an aesthetic of the eye. That was basically the only thing.”

Trammell told reporters after Thursday’s game that he had used that bat for “a long time,” and that he takes batting practice with it and had it with him when he was with Triple-A Sugar Land. He said because he doesn’t have a gloss finish on his bat, the paint wears down over time.

“I was more so just concerned if I did anything wrong,” Trammell said Friday. “I don’t cut any corners or anything like that. I just wanted to make sure that, one, I didn’t want to bring any attention to the clubhouse or anything like that. We’re here to win and I felt like that was kind of a hurdle in that. I just wanted to make sure the team knows I’m here to win.”

Trammell played five games for the Yankees last year before being released. He has a 90 wRC+ for the Astros in 44 games this season. On Friday, Trammell reiterated his affinity for the Yankees organization, which he said treated him well.

“I’ve got a lot of respect for those guys over there,” Trammell said. “They traded me over here, which for me, has been a great opportunity. I love it here. My wife loves it here. It’s a great organization and, over there, great organization that is first-class and treated me well.”

Trammell did have one unresolved concern: whether he’ll receive the bat back from MLB.

“I probably just want it to have it just ’cause. I can have a story to tell my grandkids about it,” he said. “It’s a cool, funny story. But I don’t know if they’ll give it back.”

(Photo of umpires Adrian Johnson and Ramon De Jesus examining Taylor Trammell’s bat: Alex Slitz / Getty Images)