Once again: SRM to sRGB

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Joined
Aug 1, 2022
Messages
7
Reaction score
2
Location
Austria
I have recently been working on an article about calculating SRM/EBC values of beer recipes for my home brew club. In this article, I also wanted to incorporate an EBC color scale. Well, this endeavor took me further down the rabbit hole than I had hoped. In my search for a suitable formula, I examined the source code of several brewery calculators and concluded that they use either a fixed table (with unknown origin) or a mathematical interpolation function based on a beer color chart. I was not satisfied with these approaches. Then I came across a 10 year old thread on this forum where A.J. deLange explained how to implement the model for spectrum reconstruction from SRM measurements he was working on. Long story short, I was able to create my color scale, but it took a while. So I thought others might have an interest in my code as well. I set up a Github repository at GitHub - aschet/olfarve: Beautiful beer colors for everyone and put some reusable programs for several programming languages there (yes, including an Excel spreadsheet) that show how to get colors in the sRGB color space (2-degree observer, D65 illuminant) from said model. Since I am still quite new to the topic of color space transformation, I can only hope that I have implemented everything correctly. If you find a critical error, please let me know.
 
Back
Top