Are online colleges accredited if the colleges are accredited?

This question is not logical. Yes, if a college is accredited, it is accredited.

I think what you are asking about are online programs within colleges.

Accreditation is for the institution (the college or university). Accreditors generally require as part of that process that online programs must be approved as part of the institutional accreditation.

Under current circumstances where many colleges have had to suddenly go remote, accreditors and the government have allowed colleges that are not approved for online delivery to offer remote instruction.

In the U.K, the Open University has the same accreditation as any university within the UK including all the famous ones like Oxford and Cambridge it may not carry the same kudos though.