Comment by ecshafer
I kind of have to disagree. I have really learned to love the explicitness of a big ole' switch statement. Its fast, no misdirection, all available in one place, and its easily readable where you need it. All of the "clean code" options for something like this I have seen that used more abstraction ultimately just split up the fact you have to keep a list of 100 something hex code values and some value there.
Can't tell what would be the best case (pun intended) for you, depends on the language you use. Yes, it will eventually end up as some sort of look-up table, though switch statement is the last option I'd use (assuming you gonna have more than 20 cases or so).
The good thing of programming without generative assistants is that it makes you think how to make the algorithm and the code better to avoid too much manual work. Laziness of engineers is crucial for automation and optimisation.