# Color Detector & Camera Eyedropper

> Real-time color detection via camera or image: Pixel-exact sampling and area average.

- Open in browser: https://pockettoolbox.org/en/color-detector
- Runs entirely in your browser; files and input are never uploaded.

## How it works

Analyzes colors from a live camera feed or an image file with both single-pixel and area-averaged modes.

Align the reticle with the desired point in the video feed or image. The tool reads the exact RGB value of the target pixel and simultaneously calculates the arithmetic mean of surrounding pixels to suppress sensor noise. Color codes can be copied as HEX, RGB, or HSL, or saved to a palette.

Extracts pixel data using HTML5 Canvas (getImageData) from the video stream or image. Area averaging sums all R, G, and B channels across the selected sampling window (e.g., 5x5 to 25x25 pixels) and divides by the total pixel count. Nearest color names are determined via Euclidean distance in RGB color space.

---
PocketToolbox (https://pockettoolbox.org/en)
