St. Thomas.
Prima Secundae 76, Article 3:
I answer that, Ignorance, by its very nature, renders the act which it causes involuntary. Now it has already been stated (Articles 1 and 2) that ignorance is said to cause the act which the contrary knowledge would have prevented; so that this act, if knowledge were to hand, would be contrary to the will, which is the meaning of the word involuntary. If, however, the knowledge, which is removed by ignorance, would not have prevented the act, on account of the inclination of the will thereto, the lack of this knowledge does not make that man unwilling, but not willing, as stated in Ethic. iii, 1: and such like ignorance which is not the cause of the sinful act, as already stated, since it does not make the act to be involuntary, does not excuse from sin. The same applies to any ignorance that does not cause, but follows or accompanies the sinful act.
On the other hand, ignorance which is the cause of the act, since it makes it to be involuntary, of its very nature excuses from sin, because voluntariness is essential to sin. But it may fail to excuse altogether from sin, and this for two reasons. First, on the part of the thing itself which is not known. For ignorance excuses from sin, in so far as something is not known to be a sin. Now it may happen that a person ignores some circuмstance of a sin, the knowledge of which circuмstance would prevent him from sinning, whether it belong to the substance of the sin, or not; and nevertheless his knowledge is sufficient for him to be aware that the act is sinful; for instance, if a man strike someone, knowing that it is a man (which suffices for it to be sinful) and yet be ignorant of the fact that it is his father, (which is a circuмstance constituting another species of sin); or, suppose that he is unaware that this man will defend himself and strike him back, and that if he had known this, he would not have struck him (which does not affect the sinfulness of the act). Wherefore, though this man sins through ignorance, yet he is not altogether excused, because, not withstanding, he has knowledge of the sin. Secondly, this may happen on the part of the ignorance itself, because, to wit, this ignorance is voluntary, either directly, as when a man wishes of set purpose to be ignorant of certain things that he may sin the more freely; or indirectly, as when a man, through stress of work or other occupations, neglects to acquire the knowledge which would restrain him from sin. For such like negligence renders the ignorance itself voluntary and sinful, provided it be about matters one is bound and able to know. Consequently this ignorance does not altogether excuse from sin. If, however, the ignorance be such as to be entirely involuntary, either through being invincible, or through being of matters one is not bound to know, then such like ignorance excuses from sin altogether.
Basically, an ignorance whereby you would not have committed the act (had you known otherwise) excuses entirely from sin, since since is by very definition and inherently and act of the will and voluntary.
If, on the other hand, your will was inclined to commit the sin anyway, even if you had known about it, this makes you not "unwilling" but simply "not willing" (
per accidens). Here's an example. I regularly ignore fast days of the Church and just eat what I want. Today happens to be an Ember Day, but I'm ignorant that it's an Ember Day, and so I don't fast. Well, even HAD I known it was an Ember Day, I would have eaten what I wanted anyway, since I just don't care. That's the distinction between "not willing" (
per accidens) and being "unwilling"
per se to commit a sin.
You can go on the read the rest of 76 yourselves, but ignorance can diminish guilty to the extent that the ignorance itself is voluntary. For fully-willful ignorance, St. Thomas cites the example of someone who refuses to learn about the possible sinfulness of certain actions precisely because he doesn't WANT to know, so he can go ahead and do those actions. Partially diminishing the guilty would be someone who's just lazy and therefore doesn't know something he should know, though doesn't do it specifically so that he could commit sin. These, again, are varying degrees between being unwilling and being not willing merely by accident.