It depends on the screen, but the sRGB colorspace is well defined. So in theory, you can get an exact match to whatever color, if it is in the color doable in the colorspace.
Drawing a spectrum is outside of any colorspace, because the spectrum is made in theory of one unique frequency, this is would be the border of the possible colors like in the horseshoe diagram.
https://en.wikipedia.org/wiki/SRGB#/media/File:SRGB_chromaticity_CIE1931.svgWhereas an additive colorspace renders a polygon, a triangle, and everything within the triangle. This is the case of sRGB or AdobeRGB or even the widest colorspaces, that anyway cannot be rendered by a regular screen.
So it is impossible to draw the colorspectrum. It will always be an approximation of it that has less saturation, to speak in HSL terms.
What you can render on a screen though, is the spectrum with less saturation and with a gray background added to it. So the negative values that you would get for the color channels are mitigated by the constant of the gray background.