Allow specifying a darkness threshold

If you want to prefer towards considering images "dark", then you need a way to change the darkness threshold. This change introduces API changes to allow passing a darkness threshold.

Also minimal documentation.