  In this paper we introduce CaRM, a semi-automatic code for the retrieval of
broadband transmission spectra of transiting planets through the chromatic
Rossiter-McLaughlin method. We applied it to HARPS and ESPRESSO observations of
two exoplanets to retrieve the transmission spectrum and we analyze its fitting
transmission models. We used the strong radius dependence of the
Rossiter-McLaughlin (RM) effect amplitude, caused by planetary companions, to
measure the apparent radius change caused by the exoplanet atmosphere. In order
to retrieve the transmission spectrum, the radial velocities, which were
computed over wavelength bins that encompass several spectral orders, were used
to simultaneously fit the Keplerian motion and the RM effect. From this, the
radius ratio was computed as a function of the wavelength, which allows one to
retrieve the low-resolution broadband transmission spectrum of a given
exoplanet. CaRM offers the possibility to use two Rossiter-McLaughlin models
taken from ARoME and PyAstronomy, associated with a Keplerian function to fit
radial velocities during transit observations automatically. Furthermore it
offers the possibility to use some methods that could, in theory, mitigate the
effect of perturbation in the radial velocities during transits. The CaRM code
allows one to retrieve the transmission spectrum of a given exoplanet using
minimal user interaction. We demonstrate that it allows one to compute the
low-resolution broadband transmission spectra of exoplanets observed using
high-resolution spectrographs such as HARPS and ESPRESSO.
