EBC or SRM to color RGB

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.
I don't think there's a formula. I think you have to use a lookup table sort of thing.

I guess if there really is a formula, I'd love to know it.
 
all i can think of:

put the recipe in BeerSmith or other brew program, take a screenshot, paste into Photoshop, Gimp, etc, use the sample tool on the portion of the screen shot displaying the color
 
This is the mapping we use on the wiki for SRM. You can easily translate these to RGB. Anything over 30 is just black basically.

1 = #F3F993
2 = #F5F75C
3 = #F6F513
4 = #EAE615
5 = #E0D01B
6 = #D5BC26
7 = #CDAA37
8 = #C1963C
9 = #BE8C3A
10 = #BE823A
11 = #C17A37
12 = #BF7138
13 = #BC6733
14 = #B26033
15 = #A85839
16 = #985336
17 = #8D4C32
18 = #7C452D
19 = #6B3A1E
20 = #5D341A
21 = #4E2A0C
22 = #4A2727
23 = #361F1B
24 = #261716
25 = #231716
26 = #19100F
27 = #16100F
28 = #120D0C
29 = #100B0A
30 = #050B0A

Hope that helps! :mug:
 
I found this image looking for the same thing, 40 points of data isn't a lot for a lookup table so I was content and stopped looking for a true SRM->RGB algorithm.

It does seem to be a bit light north of 25ish to me though

SRM Beer Color Chart
 
I have an Excel spreadsheet that uses a macro to create a beer color palate. You can modify the values if you like. The chart has all of the points tor the RGB coordinates graphed and it definitely doesn't follow anything normal.

Beer Color Palette

(NOTE: It has a macro that draws the color palette, so you will have to have your security set to medium to use it. If you have concerns on the coding, I can PM you the the code and you can have it checked for safety.)
 
I found this image looking for the same thing, 40 points of data isn't a lot for a lookup table so I was content and stopped looking for a true SRM->RGB algorithm.

It does seem to be a bit light north of 25ish to me though

SRM Beer Color Chart

Here is the code list from the above listed sight. Sorry HBT, but I like these colors WAY more.

code -> SRM

#FFE699 -> 1
#FFD878 -> 2
#FFCA5A -> 3
#FFBF42 -> 4
#FBB123 -> 5
#F8A600 -> 6
#F39C00 -> 7
#EA8F00 -> 8
#E58500 -> 9
#DE7C00 -> 10
#D77200 -> 11
#CF6900 -> 12
#CB6200 -> 13
#C35900 -> 14
#BB5100 -> 15
#B54C00 -> 16
#B04500 -> 17
#A63E00 -> 18
#A13700 -> 19
#9B3200 -> 20
#952D00 -> 21
#8E2900 -> 22
#882300 -> 23
#821E00 -> 24
#7B1A00 -> 25
#771900 -> 26
#701400 -> 27
#6A0E00 -> 28
#660D00 -> 29
#5E0B00 -> 30
#5A0A02 -> 31
#600903 -> 32
#520907 -> 33
#4C0505 -> 34
#470606 -> 35
#440607 -> 36
#3F0708 -> 37
#3B0607 -> 38
#3A070B -> 39
#36080A -> 40
 
Could someone explain how to me how to map those hexadecimal numbers to colors in excel? Is it possible?

Also, any chance someone has an excel spreadsheet with the SRM color scale conditionally formatted into a cell? This would mean you enter the SRM value into the cell and the cell would turn the right SRM color.
 
This is SRM to RGB

0,1 250 250 210
0,2 250 250 204
0,3 250 250 199
0,4 250 250 193
0,5 250 250 188
0,6 250 250 182
0,7 250 250 177
0,8 250 250 171
0,9 250 250 166
1 250 250 160
1,1 250 250 155
1,2 250 250 149
1,3 250 250 144
1,4 250 250 138
1,5 250 250 133
1,6 250 250 127
1,7 250 250 122
1,8 250 250 116
1,9 250 250 111
2 250 250 105
2,1 250 250 100
2,2 250 250 94
2,3 250 250 89
2,4 250 250 83
2,5 250 250 78
2,6 249 250 72
2,7 248 249 67
2,8 247 248 61
2,9 246 247 56
3 245 246 50
3,1 244 245 45
3,2 243 244 45
3,3 242 242 45
3,4 241 240 46
3,5 240 238 46
3,6 239 236 46
3,7 238 234 46
3,8 237 232 47
3,9 236 230 47
4 235 228 47
4,1 234 226 47
4,2 233 224 48
4,3 232 222 48
4,4 231 220 48
4,5 230 218 48
4,6 229 216 49
4,7 228 214 49
4,8 227 212 49
4,9 226 210 49
5 225 208 50
5,1 224 206 50
5,2 223 204 50
5,3 222 202 50
5,4 221 200 51
5,5 220 198 51
5,6 219 196 51
5,7 218 194 51
5,8 217 192 52
5,9 216 190 52
6 215 188 52
6,1 214 186 52
6,2 213 184 53
6,3 212 182 53
6,4 211 180 53
6,5 210 178 53
6,6 209 176 54
6,7 208 174 54
6,8 207 172 54
6,9 206 170 54
7 205 168 55
7,1 204 166 55
7,2 203 164 55
7,3 202 162 55
7,4 201 160 56
7,5 200 158 56
7,6 200 156 56
7,7 199 154 56
7,8 199 152 56
7,9 198 150 56
8 198 148 56
8,1 197 146 56
8,2 197 144 56
8,3 196 142 56
8,4 196 141 56
8,5 195 140 56
8,6 195 139 56
8,7 194 139 56
8,8 194 138 56
8,9 193 137 56
9 193 136 56
9,1 192 136 56
9,2 192 135 56
9,3 192 134 56
9,4 192 133 56
9,5 192 133 56
9,6 192 132 56
9,7 192 131 56
9,8 192 130 56
9,9 192 130 56
10 192 129 56
10,1 192 128 56
10,2 192 127 56
10,3 192 127 56
10,4 192 126 56
10,5 192 125 56
10,6 192 124 56
10,7 192 124 56
10,8 192 123 56
10,9 192 122 56
11 192 121 56
11,1 192 121 56
11,2 192 120 56
11,3 192 119 56
11,4 192 118 56
11,5 192 118 56
11,6 192 117 56
11,7 192 116 56
11,8 192 115 56
11,9 192 115 56
12 192 114 56
12,1 192 113 56
12,2 192 112 56
12,3 192 112 56
12,4 192 111 56
12,5 192 110 56
12,6 192 109 56
12,7 192 109 56
12,8 192 108 56
12,9 191 107 56
13 190 106 56
13,1 189 106 56
13,2 188 105 56
13,3 187 104 56
13,4 186 103 56
13,5 185 103 56
13,6 184 102 56
13,7 183 101 56
13,8 182 100 56
13,9 181 100 56
14 180 99 56
14,1 179 98 56
14,2 178 97 56
14,3 177 97 56
14,4 175 96 55
14,5 174 95 55
14,6 172 94 55
14,7 171 94 55
14,8 169 93 54
14,9 168 92 54
15 167 91 54
15,1 165 91 54
15,2 164 90 53
15,3 162 89 53
15,4 161 88 53
15,5 159 88 53
15,6 158 87 52
15,7 157 86 52
15,8 155 85 52
15,9 154 85 52
16 152 84 51
16,1 151 83 51
16,2 149 82 51
16,3 148 82 51
16,4 147 81 50
16,5 145 80 50
16,6 144 79 50
16,7 142 78 50
16,8 141 77 49
16,9 139 76 49
17 138 75 48
17,1 137 75 47
17,2 135 74 47
17,3 134 73 46
17,4 132 72 45
17,5 131 72 45
17,6 129 71 44
17,7 128 70 43
17,8 127 69 43
17,9 125 69 42
18 124 68 41
18,1 122 67 41
18,2 121 66 40
18,3 119 66 39
18,4 118 65 39
18,5 117 64 38
18,6 115 63 37
18,7 114 63 37
18,8 112 62 36
18,9 111 61 35
19 109 60 34
19,1 108 60 33
19,2 107 59 32
19,3 105 58 31
19,4 104 57 29
19,5 102 57 28
19,6 101 56 27
19,7 99 55 26
19,8 98 54 25
19,9 97 54 24
20 95 53 23
20,1 94 52 21
20,2 92 51 20
20,3 91 51 19
20,4 89 50 18
20,5 88 49 17
20,6 87 48 16
20,7 85 48 15
20,8 84 47 13
20,9 82 46 12
21 81 45 11
21,1 79 45 10
21,2 78 44 9
21,3 77 43 8
21,4 75 42 9
21,5 74 42 9
21,6 72 41 10
21,7 71 40 10
21,8 69 39 11
21,9 68 39 11
22 67 38 12
22,1 65 37 12
22,2 64 36 13
22,3 62 36 13
22,4 61 35 14
22,5 59 34 14
22,6 58 33 15
22,7 57 33 15
22,8 55 32 16
22,9 54 31 16
23 52 30 17
23,1 51 30 17
23,2 49 29 18
23,3 48 28 18
23,4 47 27 19
23,5 45 27 19
23,6 44 26 20
23,7 42 25 20
23,8 41 24 21
23,9 39 24 21
24 38 23 22
24,1 37 22 21
24,2 37 22 21
24,3 36 22 21
24,4 36 21 20
24,5 35 21 20
24,6 35 21 20
24,7 34 20 19
24,8 34 20 19
24,9 33 20 19
25 33 19 18
25,1 32 19 18
25,2 32 19 18
25,3 31 18 17
25,4 31 18 17
25,5 30 18 17
25,6 30 17 16
25,7 29 17 16
25,8 29 17 16
25,9 28 16 15
26 28 16 15
26,1 27 16 15
26,2 27 15 14
26,3 26 15 14
26,4 26 15 14
26,5 25 14 13
26,6 25 14 13
26,7 24 14 13
26,8 24 13 12
26,9 23 13 12
27 23 13 12
27,1 22 12 11
27,2 22 12 11
27,3 21 12 11
27,4 21 11 10
27,5 20 11 10
27,6 20 11 10
27,7 19 10 9
27,8 19 10 9
27,9 18 10 9
28 18 9 8
28,1 17 9 8
28,2 17 9 8
28,3 16 8 7
28,4 16 8 7
28,5 15 8 7
28,6 15 7 6
28,7 14 7 6
28,8 14 7 6
28,9 13 6 5
29 13 6 5
29,1 12 6 5
29,2 12 5 4
29,3 11 5 4
29,4 11 5 4
29,5 10 4 3
29,6 10 4 3
29,7 9 4 3
29,8 9 3 2
29,9 8 3 2
30 8 3 2
 
Is there a built in excel function to read those values, or do I need to download something?
 
Copy the data above, drop in a txt file (notepad), use replace menu item to replace commas with periods, replace spaces with commas, open in excel, choose "data separated by commas" (tab is the CSV default).

You'll need to use VBA to plot color in a cell, if that's what you're looking for.
 
Tristimulus values (R,G,B) cannot be calculated for a particular SRM because
1. The color formed depends on the thickness of beer through which the light is shining. Darker and redder the wider the glass.
2. The color formed depends on the nature of the illuminant. Redder with "warm" illuminants (A) and bluer with "cooler" (D65).
3. The color perceived depends on whether the beer is held close to the eye (10° Observer) or farther away (2° Observer).
4. The values of R,G,B depend on the color space (sRGB, NTSC, Rec. 709....)
5. Even if conditions 1-4 are the same beers with the same SRM may look totally different. For example, Lindeman's Kriek and Fuller's ESB both have the same SRM but the kriek is much darker and redder.

About the best that can be done is to establish typical viewing conditions: 5 cm path, illuminant C, 2° Observer, sRGB, for example, and then compute colors based on an "average" spectrum. There is a spreadsheet at www.wetnewf.org that will allow you to do this.
 
Based on Soren's awesome SRM to RGB values, I whipped up a quick ini file that can do some quick calculations for you:

http://methodbrewery.com/srm.php

Coming soon, I'll add in a convert to Hex button just for kicks and some sample beer styles & brands along the beautiful beer color gradient!
 
As noted in #14 one cannot produce RGB values from SRM without specifying the path, the illuminant, the observer and some information about the spectral deviation of the beer from "average". The Wikipedia article referenced at
http://methodbrewery.com/srm.php (which I wrote though it has been dicked with to some extent - that's Wikipedia) goes into this in some more detail. It is pointless to calculate and display RGB colors unless you specify what path, what illuminant... etc. and verify that the colors are indeed likely to be beer colors. The colors in the chart in the Wikipedia article are not valid beer colors, for example which means that for the specified SRM values I cannot come up with any combination of path, illuminant, observer and spectrum deviation coefficients which give me the colors in the swatches.
 
#600903 -> 32 should be #560A05

I entered all the colors into a database and made a color table with it, and number 32 was not right ! So i took 31 and 33 and took the average !
Othervise a realy cool chart, thanks :)

Here is the code list from the above listed sight. Sorry HBT, but I like these colors WAY more.

code -> SRM

#FFE699 -> 1
#FFD878 -> 2
#FFCA5A -> 3
#FFBF42 -> 4
#FBB123 -> 5
#F8A600 -> 6
#F39C00 -> 7
#EA8F00 -> 8
#E58500 -> 9
#DE7C00 -> 10
#D77200 -> 11
#CF6900 -> 12
#CB6200 -> 13
#C35900 -> 14
#BB5100 -> 15
#B54C00 -> 16
#B04500 -> 17
#A63E00 -> 18
#A13700 -> 19
#9B3200 -> 20
#952D00 -> 21
#8E2900 -> 22
#882300 -> 23
#821E00 -> 24
#7B1A00 -> 25
#771900 -> 26
#701400 -> 27
#6A0E00 -> 28
#660D00 -> 29
#5E0B00 -> 30
#5A0A02 -> 31
#600903 -> 32
#520907 -> 33
#4C0505 -> 34
#470606 -> 35
#440607 -> 36
#3F0708 -> 37
#3B0607 -> 38
#3A070B -> 39
#36080A -> 40

ebc32.png
 
As noted in #16 and #14 you cannot map SRM to color. Very significant in this is that the gamut of modern display systems is much smaller than the gamut of beer colors (which become quite saturated even for modest SRM). IOW you can't do what you are trying to do. If you are going to publish a mapping anyway you are obliged to at least indicate what set of viewing conditions you think this mapping approximates and you especially need to indicate the color space to which your numbers belong. The BJCP guide tries to do what you are trying to do but it states very clearly that the color patches represent 1 cm of beer of average spectral characteristics (which in this case does include some krieks etc.), Illuminant C and the 2 ° observer.
 
Not relevant, its for my own brewing programme, no intensions making it public !

But thanks for the note !
 
Glad you popped up again - I couldn't remember where this thread was. I did remember that I made a graphic with the colors of 'average' beer as a function of SRM and path for Illuminant C in the sRGB space. It is appended. As you will see if you use your computer's color analysis capabilities, clipping occurs (in the Blue channel) at about 12 SRM for a 1 cm path and at 3 SRM for a 5 cm path. Thus the conclusion that except for very light beers or beers observed in a very short path you can't represent beer color very well on a computer monitor.

Looking back over the thread which I recognize is old I see there was a question as to a formula. There is a formula in the Wikipedia article Standard Reference Method which gives the transmission spectrum of 'average' beer (including lambics etc.). Assuming you know something of color theory you will know how to insert that spectrum into the ASTM E-308 algorithm to calculate X, Y, and Z and how to transform those to sRGB or any other color space which can be tied to XYZ.

BeerColors.jpg
 
Thank you for that chart.

As mentioned before, this is for my own private beer programe, and I only use this to get a estimation of the color of the beer, alongside with IBU and ABV, not perfecr, but so far it does the trick for me ! Over time I might "calibrate" the color if the differences get to big !

beer.png
 
I know this is an old thread and Im a newb here but...I built an app that takes photo in and gives SRM . It works good enough I think but I would like to get some other brewers opinions on it though. Like the other guy said there is some complicated trig going on with conversions and other algorithms used to find color difference and pictures must be taken under precise circumstances (lighting, path, etc).
 
Back
Top