No person shall be convicted of perjury in the first degree if he retracted his false statement in the course of the same proceeding in which it was made. Statements made in separate hearings at separate stages of the same trial or administrative proceeding shall be deemed to have been made in the course of the same proceeding. Retraction is an affirmative defense.
C.R.S. § 18-8-508
For affirmative defenses generally, see §§ 18-1-407, 18-1-710, and 18-1-805.