On the CBS sitcom “How I Met Your Mother,” Neil Patrick Harris plays perhaps the most style-obsessed male sitcom character since Alex P. Keaton. Hardly ever seen sans suit since the show debuted in 2005, Barney Stinson uses his wardrobe as a weapon for womanizing. It’s a suit of armor and a security blanket rolled into one.

It’s become such a trademark of Harris’ character that when the show’s 100th episode, “Girls vs. Suits,” found him confronted with the choice of a beautiful bartender or his signature suits, the result was a full-blown, street-filling, suit-sporting song-and-dance number -- favoring the suit. Oh, did we mention that, in the same episode, his tailor is played by none other than “Project Runway” mentor Tim Gunn?

And the man who plays the man beneath the suit? Harris, 36, claims to have no fashion sense at all, and describes himself as prone to jumping on trend bandwagons long after everyone else has jumped off.

“I’m a jeans and T-shirt kind of guy,” he said in a recent interview. “I was intimidated by high-end fashion growing up, and I never really bought into all the expensive things they were hawking in the fashion magazines.

“I didn’t know what to make of it. . . . I’d go into Fred Segal and panic at all the $6,000 shirts. I’d just as soon go to H&M and buy a similar shirt for $70.”

Even so, as a result of playing the show’s well-clad cad, Harris has had the luxury of engaging in some sartorial soul-searching. “Because the wardrobe department adds four or five new suits to Barney’s wardrobe each season, I’ve had the chance to try on just about every brand of suit on the market,” he said.

“That’s how I found that certain brands just fit my body type well. Dolce & Gabbana uses thinner fabrics and that makes them more comfortable for me -- that’s another thing I’ve learned from” the show.

Harris, who doesn’t rely on a personal stylist to dress him for talk show appearances and red carpets, has even borrowed from the show’s wardrobe on occasion. “That’s one of the great things about being a guy,” he said. “You can just throw on a suit.”

And when pressed, he’ll admit he can see the wisdom of spending good money on denim (he favors Levi’s and Hudson) and underwear -- “the stuff you wear all the time,” he said. He shops for clothes at Barneys CO-OP (“the one at the Grove is pretty good, but I’m usually in New York”). He’s partial to shades of blue and gray, shuns bold patterns and confesses a peculiar addiction to V-neck T-shirts.

“Slate gray is my favorite color,” he said. “I probably have 15 gray short-sleeve V-neck T-shirts in my house. Every time I go to buy clothes, I seem to end up with two more. I’ve got dark gray, darker gray, light gray, lighter gray, [and] darker blue-gray.”

Before he landed the role of Barney Stinson, Harris went through what he describes as an “Abercrombie & Fitch stage.” But, for the last five years, he says he’s been making a conscious effort to hew to a more classic, timeless look, favoring gray suits and thinnish neckties not unlike his small-screen counterpart.

“I want something where you couldn’t tell the decade the minute you look at it,” he said. “Like Dean Martin or the men in Alfred Hitchcock movies.”

Where does this desire for a timeless look come from? “From looking at pictures of myself in a bolo tie and a puffy shirt and knowing the exact month that it was taken.”

That’s why Harris wanted some input on how his character dressed. Co-creators Craig Thomas and Carter Bays “were already planning on putting him in a suit. I remember angling very strongly toward the slightly thinner tie -- not ‘80s rock band thin -- just thinner than what was in style” when the show started, he said. “And I think someone in the wardrobe department tried to tell me thin ties were totally out, that no one made them these days and that we probably couldn’t even get any. I went out and bought some just to show them.

“I thought the look should be like Cary Grant’s in ‘North by Northwest’: just really timeless. I didn’t want to have to look back at reruns of the show and remember my suits as if they were ‘Cosby’ sweaters.”

He appreciates the resurgence of “Mad Men” style, prefers accessorizing with something simple like a tie clip or cuff links and likes the look that Joseph Gordon-Levitt rocked in "(500) Days of Summer” -- a dress shirt with rolled-up sleeves, a sweater vest and a loosened tie. “I think that’s a good look; you can wear it casually for dinner or on a talk show and it’s still appropriate.”

Harris has a special affinity for British designer Paul Smith. “I’m a taller, slender guy, and I appreciate the European cut, and the Brits are dandy dressers, so I’m glad that’s coming back.”

Of all the clothes he’s worn over the course of his 20-year career on screen and stage, he can single out only one outfit he couldn’t bear to part with -- the white Dolce & Gabbana satin shawl collar dinner jacket he wore as he took to the stage as host of the 61st prime-time Emmy Awards in September.

“I had to beg and plead to keep [it]. Because it was a sample, they weren’t going to let me keep it. I was like: ‘Please, please -- who else is going to wear this? It’s been tailored within an inch of its life to fit me.’

“It’s not only a sharp-looking jacket, but I think it’s going to be great for murder mystery games,” he said with a laugh.

“I think I have a monocle somewhere that might be perfect for that.”

adam.tschorn@latimes.com