How does colorvision and night vision function?

Color vision is related to cones in the retina, while dim-light vision is related to the rods.