Change colorizing of fingerprint to use SHA1 based on apg's commit 67ffc

In relation to issue #380
Added the usage of sha1 hash as proposed by apg. Also added an extra if to change the background based on brightness of the text color.