Nim-lang, 862 274274 246 bytes
import pixie
var
y=33.0
m=newImage(330,198)
c=newContext(m)
s=vec2(y*9,y/2)
t=vec2(0,y/2)
q=vec2(0,y)
for i in 0..5:c.strokeStyle="#FF5C00#FF8C00#FFE900#006400#00008B#4B0082"[i*7..i*7+6];c.lineWidth=y;c.strokeSegment(segment(t,s));t+=q;s+=q;m.writeFile("l.png")
var
y=33.0
m=newImage(297,198)
c=newContext(m)
r=y/2
for i in 0..5:c.strokeStyle="#FF5C00#FF8C00#FFE900#006400#00008B#4B0082"[i*7..i*7+6];c.lineWidth=y;c.strokeSegment(segment(vec2(0,r),vec2(y*9,r)));r+=y;m.writeFile("l.png")
Using the Nim library pixie. If you have Nim and Nimble installed, a quick nimble install pixie should let you run it perfectly! It outputs to l.png. I am inexperienced with Pixie and Nim, so if I did anything wrong, please let me know. This answer has gone through a lot of revisions, from totally un-golfy to fairly golfed. Bytes were counted using wc -c.


