The Wildcats, who won for just the second time in seven games, blew an early 9-point lead and trailed by 11 points early in the second half before surging ahead and then putting the game away with a late 16-0 run.
Richard Roby, who led Colorado (17-6, 7-5) with 28 points in Wednesday's 84-75 victory over No. 19 Oklahoma, was held to 14 points on 5-for-14 shooting. He had three airballs and just five points in the second half.
Kansas State had its own offensive struggles, going more than 8 minutes without a field goal in the late first half and early second before Wright scored nine straight points in a 13-2 run that put the Wildcats up 46-43 with just under 9 1/2 minutes left.
Wright started his surge with a putback, following it up over the next 3 1/2 minutes with a fast-break dunk, a 3-point play and a pair of free throws.
Glean Eddy's basket with 8:25 left put Colorado just one point behind, at 46-45, but Kansas State responded with its 16-point run. The Buffaloes didn't score again until Josh Campbell put back his own miss with 1:52 to go to make it 62-47.
The 16-0 surge started quietly enough, when Diarra hit a 19-footer with just over 8 minutes left. Both teams went scoreless on several possessions after that, but Mario Taybron's 3-pointer with 6 1/2 minutes left and Martin's fast-break dunk 35 seconds later put the momentum squarely on Kansas State's side.
Marcus Hall led the Buffaloes, who lost their third straight road game, with 15 points.
A 17-7 run, capped by Wright's steal and layup, gave the Wildcats a 21-12 lead with just under 8 1/2 minutes left in the first half. They managed just two more free throws before halftime, though, and an 18-5 surge put the Buffaloes up 30-26 at the break.
The Buffaloes opened the second half on a 7-0 run before Martin's 3-pointer with 17:11 left broke Kansas State's dry spell from the field.
The Wildcats were just 1-for-3 from the line in the first half, when the Buffaloes were called for only four fouls. Kansas State finished 14-for-19 after Colorado was forced to foul late in the game.