Canaries were primarily used to detect odorless, colorless carbon monoxide (CO), also known as 'afterdamp' or 'whitedamp', which is particularly lethal as it replaces oxygen in the bloodstream without human detection. They could also indicate methane.