Legality, n.
Etymology: [Cf. LL. legalitas, F. légalité. Cf. Loyalty.]
1. The state or quality of being letter of the law.
Shades of meaning
Fernald has no entry of its own for legality; he lists it under justice.
Where he writes about it:
Lawfulness is an ambiguous word, meaning in its narrower sense mere legality, which may be very far from justice, but in its higher sense signifying accordance with the supreme law of right, and thus including perfect justice. — from justice