As a property manager, I can tell you that your first statement is absolutely incorrect, and most leases have a clause that say so.  Neither the state nor cities require any repairs to be made.  There is not even a statute of warrantability in Colorado.  This is a "landlord state."  All that is required in a residence is a stove, a working toilet and running water.  In few cases, however, judges have allowed what you describe in your second sentence as an affirmative defense, but only after proper notification to the landlord and that this is what you have done with the rent money, and only if the tenant can prove that a certain number of notices have been provided to the landlord.  But keep in mind that, by the time a tenant gets before a judge to hear the case, the eviction had long-since occurred, so this may not stop the tenant from finding somewhere else to live, which is usually the landlord's objective.

Don't try to play lawyer or take advice from others who do.