SetColor duration

To avoid too quick colour changes in my app I’m exploring duration-field in SetColor-message. Is colour change linear? Meaning at moment duration/2 colour is exact average of starting colour and new colour. And how frequently is colour actually changed during transition, it looks very smooth to me?