Graphics3D[{CapForm[None], Thickness[.1], Line[{{0, 0, 0}, {1, 1, 1}}, VertexColors -> {Red, Blue}]}]