Changed hash based color calc to a hash indexed palette as discussed in the pull request.