I'm trying to change the color of each row, I have 2 arrays. One has names of color, the other has color codes. 

I have a ListView with Color names, the names are stored in an array of String.

```
String[] colourNames;
String[] colourCodes;

 protected void onCreate(Bundle savedInstanceState) {
     colourNames = getResources().getStringArray(R.array.listArray);
     colourCodes = getResources().getStringArray(R.array.listValues);

     ListView lv = (ListView) findViewById(R.id.listView);

    ArrayAdapter aa = new ArrayAdapter(this, R.layout.activity_listview, colourNames);

    lv.setAdapter(aa);

    for(int i=0; i<colourCodes.length; i++)
        lv.getChildAt(i).setBackgroundColor(Color.parseColor(colourCodes[i]));
 }

```

In arrays.xml:

```
<string-array name="listArray">
        <item>aliceblue</item>
        <item>antiquewhite</item>
        <item>aquamarine</item>
        <item>azure</item>
</string-array>
<string-array name="listValues">
        <item>00f0f8ff</item>
        <item>00faebd7</item>
        <item>007fffd4</item>
        <item>00f0ffff</item>
 </string-array>

```

The app crashes at `lv.getChildAt(i).setBackgroundColor(Color.parseColor(colourCodes[i]));`