pro red_vector,a_v,dcolor,xform=xform
; This routine accepts a vector of V-band interstellar extinction coefficients,
; and returns the corresponding changes in the 9 standard Kepler colors
; u-g, g-r, r-i, i-z, z-J J-H H-Ks g-Gred g-D51
; Results are in dcolor(9,nst).
; If keyword xform is set, then the output colors are transformed according
; to the linear transformation coefficients found in file xform.
; The reddening vector used is an interpolation to 5000K from values computed
; by ext_coeff.pro.
; Changing teff of the target star by 1000K changes color vector components
; by typically 2%.

; constants
rvec=[.413,.301,.214,.159,.203,.095,.073,-.190,.088]  ; reddening for a_v=1.

; do the work
nst=n_elements(a_v)
dcolor=rebin(reform(a_v,1,nst),9,nst)*rebin(rvec,9,nst)

if(keyword_set(xform)) then begin
  xform_redden,dcolor,xform,dcolort
  dcolor=dcolort
endif

end