{"id":42538,"date":"2026-09-05T22:27:26","date_gmt":"2026-09-05T20:27:26","guid":{"rendered":"https:\/\/www.graviton.at\/letterswaplibrary\/open-food-facts-is-enough-to-count-the-seven-certified-us-food-dyes-product-by-product-and-the-label-wording-turns-out-to-be-regular-enough-that-a-regex-does-it\/"},"modified":"2026-09-05T22:27:26","modified_gmt":"2026-09-05T20:27:26","slug":"open-food-facts-is-enough-to-count-the-seven-certified-us-food-dyes-product-by-product-and-the-label-wording-turns-out-to-be-regular-enough-that-a-regex-does-it","status":"publish","type":"post","link":"https:\/\/www.graviton.at\/letterswaplibrary\/open-food-facts-is-enough-to-count-the-seven-certified-us-food-dyes-product-by-product-and-the-label-wording-turns-out-to-be-regular-enough-that-a-regex-does-it\/","title":{"rendered":"Open Food Facts Is Enough To Count The Seven Certified US Food Dyes Product By Product, And The Label Wording Turns Out To Be Regular Enough That A Regex Does It"},"content":{"rendered":"<p><!-- SC_OFF --><\/p>\n<div class=\"md\">\n<p>I wanted a per-product count of the seven FD&amp;C dyes still certified for use in US food, and it turns out the Open Food Facts bulk export is enough on its own. Posting the method and the numbers because I could not find this cut published anywhere.<\/p>\n<p>Source: the Open Food Facts full CSV export, <a href=\"https:\/\/world.openfoodfacts.org\/data\">https:\/\/world.openfoodfacts.org\/data<\/a>. I used the 2026-08-31 snapshot, 1.275 GB gzipped, 4,535,553 rows. Filter to <code>countries_tags<\/code> containing <code>en:united-states<\/code> and require a non-empty <code>ingredients_text<\/code>, which leaves 444,943 products. Then match the ingredient text against the US number form, the common chemical name and the E number for each dye.<\/p>\n<table>\n<thead>\n<tr>\n<th>dye<\/th>\n<th>products<\/th>\n<th>share<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Red 40<\/td>\n<td>28,587<\/td>\n<td>6.42%<\/td>\n<\/tr>\n<tr>\n<td>Yellow 5<\/td>\n<td>25,973<\/td>\n<td>5.84%<\/td>\n<\/tr>\n<tr>\n<td>Blue 1<\/td>\n<td>22,248<\/td>\n<td>5.00%<\/td>\n<\/tr>\n<tr>\n<td>Yellow 6<\/td>\n<td>17,738<\/td>\n<td>3.99%<\/td>\n<\/tr>\n<tr>\n<td>Red 3<\/td>\n<td>6,256<\/td>\n<td>1.41%<\/td>\n<\/tr>\n<tr>\n<td>Blue 2<\/td>\n<td>4,465<\/td>\n<td>1.00%<\/td>\n<\/tr>\n<tr>\n<td>Green 3<\/td>\n<td>171<\/td>\n<td>0.04%<\/td>\n<\/tr>\n<tr>\n<td>any of the seven<\/td>\n<td>43,571<\/td>\n<td>9.79%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The part I did not expect is that the naming is regular. I went in braced for the inulin problem, where a third of the products containing an ingredient never print its common name and you spend the afternoon chasing synonyms. It is not there. Of the 6,259 products matching any Red 3 form, 23 do not use the plain &#8220;Red 3&#8221; wording, which is 0.4%. Red 40 is 96 of 28,591, or 0.3%. Yellow 5 is the worst at 0.8%, because tartrazine still turns up. A regex on the number form catches essentially all of it, which is not how ingredient text usually behaves.<\/p>\n<p>There is a regulatory reason for that. 21 CFR 101.22(k)(1) requires a colour additive subject to certification to be declared by the name given in the applicable regulation, and it explicitly allows dropping the &#8220;FD&amp;C&#8221; prefix and the &#8220;No.&#8221; So &#8220;Red 40&#8221; is not shorthand, it is the compliant form. Only colours <em>not<\/em> subject to certification may be declared under (k)(2) as &#8220;Artificial Color&#8221;, &#8220;Artificial Color Added&#8221; or &#8220;Color Added&#8221;.<\/p>\n<p>That flips something I had assumed going in. 16,768 products use one of those generic phrases, and 10,571 of them also name a certified dye, so in those the generic phrase is covering something else in the same product. 3,914 use a generic phrase and name no colourant at all, and by (k)(2) whatever those are, they are not one of the seven.<\/p>\n<p>Where the label does go dark is (k)(3), which says colouring added to butter, cheese and ice cream need not be declared at all. Most producers declare anyway: 27.5% of the 12,080 cheese records name a natural colourant, mostly annatto. But the exemption is real and it is invisible from the ingredient list.<\/p>\n<p>On timing, FDA revoked the Red 3 authorization on 2025-01-15 under the Delaney Clause and gave food manufacturers until 2027-01-15 to reformulate, so this snapshot sits four months out from the deadline. The 6,256 products span 1,073 distinct first-brands, so it is not one catalogue duplicated.<\/p>\n<p>Limitations, and the second one is large.<\/p>\n<ul>\n<li>Open Food Facts is crowd contributed. This is a sample of what people scanned, not the US shelf, and popular products are over-represented.<\/li>\n<li>Records go stale. Only 17.3% of the Red 3 rows were modified after the revocation date, against 43.0% of all rows. Restrict to rows touched since then and Red 3 falls from 1.41% to 0.57%. I am quoting both because neither is the honest single number: the full count includes labels that have already changed, the restricted count drops products nobody has rescanned.<\/li>\n<li>A string match cannot see inside &#8220;natural flavors&#8221; or a sub-ingredient it does not parse, so every figure here is a floor.<\/li>\n<li>I hand-read 12 random Red 3 matches looking for false positives and found none. They are all &#8220;fd&amp;c red #3&#8221;, &#8220;red 3 lake&#8221; and similar.<\/li>\n<\/ul>\n<p>The gap I cannot close from this export is retail availability. Does anyone know a source that would let me weight this by what is actually stocked, rather than by whoever happened to scan it?<\/p>\n<p>Disclosure per rule 1: I write an iOS app called Snack Check that reads these dyes off a barcode, which is why the parser was already sitting there. I am not linking it, and the export above is the only link in this post.<\/p>\n<\/div>\n<p><!-- SC_ON -->   submitted by   <a href=\"https:\/\/www.reddit.com\/user\/BigBalli\"> \/u\/BigBalli <\/a> <br \/> <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1w8aq7n\/open_food_facts_is_enough_to_count_the_seven\/\">[link]<\/a><\/span>   <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1w8aq7n\/open_food_facts_is_enough_to_count_the_seven\/\">[comments]<\/a><\/span><\/p><div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-42538 jlk' href='javascript:void(0)' data-task='like' data-post_id='42538' data-nonce='b9a40cecc8' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.graviton.at\/letterswaplibrary\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-42538 lc'>0<\/span><\/a><\/div><\/div> <div class='status-42538 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>I wanted a per-product count of the seven FD&amp;C dyes still certified for use in US food,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-42538","post","type-post","status-publish","format-standard","hentry","category-datatards","wpcat-85-id"],"_links":{"self":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/42538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/comments?post=42538"}],"version-history":[{"count":0,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/42538\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/media?parent=42538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/categories?post=42538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/tags?post=42538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}