One simple approach might be to divide the sum of the diagonal elements by sum of all elements in the matrix.
That would be, for example, a generalisation of accuracy.
For example, precision might be calculated by taking the average of precision per class (PPC), which you get by dividing the diagonal element in a row by the row-sum and then averaging these PPCs for each row.