color space
A color space is a coordinate system for naming colors with numbers, just as latitude and longitude name places on Earth. Any single color becomes a tuple of values, and the choice of axes — what each number means — is the color space. Different spaces describe the same colors but arrange them differently, and that arrangement determines which operations are easy. Converting an image between spaces is a deterministic recoloring of the same picture, not a loss of content (within precision and gamut limits).
The common spaces serve different goals. RGB stores red, green and blue intensities, matching how displays emit and sensors capture light, but it mixes color and brightness together so the three numbers all change when you merely dim a pixel. HSV (hue, saturation, value) separates the kind of color (hue) from its vividness and brightness, which is convenient for picking or thresholding colors by name. YCbCr splits a luminance channel (brightness, Y) from two chrominance channels (color, Cb and Cr); because human vision is far more sensitive to brightness than color, this lets JPEG and video codecs compress the color channels harder. CIE Lab is designed to be perceptually uniform — equal numeric distances correspond to roughly equal perceived color differences — and is device-independent, which makes it the right space for measuring color difference.
Choosing the space is a real engineering decision in vision. Color segmentation and skin detection often work better in HSV or Lab because illumination changes mostly affect one axis there; classical compression and streaming use YCbCr; modern deep networks usually ingest RGB directly because they learn whatever transform they need. A subtlety that matters: an RGB triple is meaningless without knowing its color space (sRGB versus linear RGB versus a wide-gamut space) and whether a gamma transfer function has been applied; the same numbers denote different physical colors in different spaces.
A widespread bug is doing arithmetic (averaging, blending, resizing) on gamma-encoded sRGB values as if they were linear light. Operations like blurring should be done in linear RGB and then re-encoded, or bright and dark regions blend incorrectly (e.g. halos and dimmed edges). Know whether your numbers are linear or gamma-encoded.