This is an example of how to present a route in Sinatra that returns a colored version of an existing svg. This assumes the first line is the line, which is what inkscape produces. Just drop in any svg, and it will give you one where it is colored in with the given color.
/dynamic/foo.svg
returns the normal image.
/dynamic/foo.svg?color=red
gives you a red image.
/dynamic/foo.svg?hue=150&sat=50&light=50
gives you a slightly green version of the image.
/dynamic/foo.svg?hex=fff
gives a white version of the image.