Although listed as synonyms, they are used differently. Darkness means dark or the absence of light. For example:
Light shone in the darkness.
It's unidiomatic to say light shone in the blackness, unless it's something metaphorical.
In addition, darkness means night or evil.
As darkness fell, we started packing.(night)
The forces of darkness took over the jungle. (evil, magic, etc.)
Would be strange or would convey different meaning to say:
As blackness fell, we started packing.
The forces of blackness took over the jungle.
These are not wrong, but they don't seem idiomatic to me.
Blackness in general means the opposite of white color or whiteness(as in your case). So you could say:
Black coffee, hair, etc. or the blackness of the coffee, hair, etc.
Or
Dark coffee, dark hair, etc.