colorband on curve

i’m making a tube with a bezier curve

but i wold like to ahve multiple color along the uibe as ringband

is it possible to put several material on that curve or if i have first to transform it to mesh?
anothere way would be to use colorband but this does not give a total control over where the bands are and they be screwed up a bit ?

i did one model with mesh and assign mjultiple color on it see pic

but i would like to do that with curves!