the idea that a sound is "warm" is basically the feeling that we're hearing more low frequencies than trebles. often it's only a matter of trebles being rolled off a little. so the resulting sound is very much the same as taking the flat signature and applying an analog EQ to it. even the phase shift would be similar as there are only so many ways to alter a frequency response in the analog domain.
in some cases, it can also be helped by distortions. some massive distortions in the low frequencies seem to feel like I'm hearing a little more bass than what the frequency response is showing sometimes. also the kind of distortions can sound harsh or soft(even or odd THD for example), I would imagine harsh sound to be easily associated with bright sound, and veil feeling sound to be associated with warmth. but you need a rather high quantity of distortions for this to matter in any way(like some old tube amps often reaching a few percent of distortions).
the last possibility comes from headphones that don't have a flat impedance response. in some cases, the impedance of the amp can alter the signature of the headphone. in such a case, if the headphone has a bump in impedance in the low frequencies, then any amp with a high impedance output would "sound" warmer than the same amp with low impedance output.
but if the bump in impedance on the headphone is in the trebles, then the reverse would occur and the high impedance amp would this time be the one feeling colder, making it clear that we're hearing the result of amp+headphone and not just a warm amp vs a cold amp. but people often don't realize that and end up calling an amplifier or a DAP warm by mistake because they tested it with only one given headphone/IEM.