A difference between two passbands
In UBV photometry, B−V subtracts the V magnitude from B. Because magnitudes are logarithmic, this measures a calibrated relation between band fluxes, not a subtraction of display-image colour pixels.
The named bands are part of the definition. Other filter pairs also form indices, but different response curves and zero points do not make their numerical values interchangeable.
References: [1]
Temperature information has conditions
Stellar spectral distributions vary with surface temperature, making indices such as B−V useful for calibrated estimates. Within an appropriate stellar regime, bluer stars generally have lower B−V values.
The relation is not a universal thermometer for every emitting object. Composite sources, spectral features and the selected passbands affect the result; spectroscopy and other observations provide complementary constraints.
Dust also changes colour
Interstellar dust attenuates wavelengths differently and can redden background stars. An observed index therefore combines intrinsic spectrum with propagation effects, so redness need not imply a lower stellar temperature.
ESO’s infrared observations of Barnard 68 used background-star colour changes to investigate obscuration. The interpretation treats colour differences as dust evidence while distinguishing background sources from the cloud itself.