There are a few different carbon monoxide detectors, but most use a biomimetic sensor with a color-changing gel. The gel changes colors when exposed to dangerous levels of CO gas. An electrical sensor detects the color change and triggers the alarm.