How to Set Vertex Colors with RGBA for LineSegments2

I want to set vertex colors with rgba for LineSegments2, but I find LineSegmentsGeometry.setColors cannot set the RGBA format.How to solve it?