for XML data, now makes either RGB(for 2D) or RGBA(for 3D) approiately