One peak, then flat
With contrastive stress you contradict an alternative, spoken or unspoken. Your voice puts a clear pitch peak on the stressed syllable of the contrast word. What matters is what follows: the rest of the sentence stays low, quiet and flat. Only that drop makes the contrast audible.
Correcting
Ho detto verde, non blu.
I said green, not blue.
La riunione è giovedì alle dieci, non mercoledì.
The meeting is on Thursday at ten, not Wednesday.
After giovedì everything stays low, including alle dieci.
Non ho detto che è caro, ho detto che è troppo caro.
I didn't say it's expensive, I said it's too expensive.
The contrast sits on troppo, not on caro.
Putting people in focus
Unstressed pronouns like ti, gli or lo cannot carry an accent. When a person is in contrast, you switch to the strong form (te, a lui, io) and put it at the end of the sentence, where the accent falls naturally. English simply stresses the pronoun where it stands: "I said it."
Neutral and contrastive
L'ho detto.
I said it.
L'ho detto io, non lui.
I said it, not him.
Ti ho scritto ieri.
I wrote to you yesterday.
Ho scritto a te, non a Marco.
I wrote to you, not to Marco.
The contrast up front
In conversation you can also pull the contrast word to the start of the sentence, with no pronoun and no pause. The peak then sits right at the front, and the whole rest of the sentence trails behind, low and flat. This order sounds especially emphatic and almost always signals a correction.
Fronted focus
Verde ho detto, non blu.
Green is what I said, not blue.
A Marco ho dato le chiavi, non a te.
It was Marco I gave the keys to, not you.
Domani parto, non oggi.
I'm leaving tomorrow, not today.
Insisting: words instead of the auxiliary
When you insist against doubt that something really is so, English stresses the auxiliary: "I did lock it!" Italian puts the accent on the auxiliary less often and prefers a stressed word: sì che at the front or eccome at the end.
Against doubt
Ma sì che l'ho chiusa, la porta!
I did lock the door!
Ci sono andato, eccome.
Oh, I went all right.