Hi,
I think you must create colormap for your problem. You can search about colormap algorithm like jet, gray, hot, winter, etc. This my simple code to create winter colormap :
Qt Code:
  1. for (int i = 0; i < m_colorMapLength; i++)
  2. {
  3. spring[i] = 1.0f * i / (m_colorMapLength - 1);
  4. cmap[i][0] = m_alphaValue;
  5. cmap[i][1] = 255;
  6. cmap[i][2] = (int)(255 * spring[i]);
  7. cmap[i][3] = 255 - cmap[i][1];
  8. }
To copy to clipboard, switch view to plain text mode 
m_colorMapLength is your listarray length. cmap variable is ARGB value. From this algorithm, you can set different color at your listarray.
Are you confused with my explanation?

Thank you for your attention.

Best regards,

Myta