Optical parameters from reflectance data. A new and versatile approach