Fixed off-by-one issue in colour index
Merge pull request #11 from jonnyarnold/master

Fixed off-by-one issue in colour index