Welcome to Web Apps SE. Thank you for your simple explanation and your example sheet. I hope you make it work as you need it.
As you have described, we must divide by the number of entries, rather than always 12. The formula for doing this in cell O3, which you can then drag down lines, could look like this:
= IFERROR (N3 / COUNTA (B3: M3))
In English, this adds up the number of non-whites using COUNTA and divides by that number. When there are no entries, we divide by zero, so the IFERROR hides only the error … "average of the null numbers".