Jason
You could break the colors into Ranges
The Highest Color number is 16,646,655
So if you wanted 10 Ranges use
` - 1,664,666
1,664,666 3,329,331
3,329,331 4,993,997
4,993,997 6,658,662
6,658,662 8,323,328
8,323,328 9,987,993
9,987,993 11,652,659 ...'
etc
and then use simple lookup to get your Ref No.