An algorithm for the optimization of kubelka‐munk absorption and scattering coefficients