In astronomy, the color index is a simple numerical expression that determines the color of an object, which in the case of a star gives its temperature. To measure the index, one observes the magnitude of an object successively through two different filters, such as U and B, or B and V, where U is sensitive to ultraviolet rays, B is sensitive to blue light, and V is sensitive to visible (green-yellow) light (see also: UBV system). The set of passbands or filters is called a photometric system. The difference in magnitudes found with these filters is called the U-B or B-V color index, respectively. The smaller the color index, the more blue (or hotter) the object is. Conversely, the larger the color index, the more red (or cooler) the object is. This is a consequence of the logarithmic magnitude scale, in which brighter objects have smaller (more negative) magnitudes than dimmer ones. For comparison, the yellowish Sun has a B-V index of 0.656±0.005, while the blueish Rigel has B-V -0.03 (its B magnitude is 0.09 and its V magnitude is 0.12, B-V=-0.03).
Color indices of distant objects are usually affected by interstellar extinction —i.e. they are redder than those of closer stars. The amount of reddening is characterized by color excess, defined as the difference between the Observed color index and the Normal color index (or Intrinsic color index), the hypothetical true color index of the star, unaffected by extinction. For example, in the UBV photometric system we can write it for the B-V color:
The passbands most optical astronomers use are the UBVRI filters, where the U, B, and V filters are as mentioned above, the R filter passes red light, and the I filter passes infrared light. This system of filters is sometimes called the Johnson-Cousins filter system, named after the originators of the system (see references). These filters were specified as particular combinations of glass filters and photomultiplier tubes. M. S. Bessel specified a set of filter transmissions for a flat response detector, thus quantifying the calculation of the color indices. For precision, appropriate pairs of filters are chosen depending on the object's color temperature: B-V are for mid-range objects, U-V for hotter objects, and R-I for cool ones.