Author Topic: EBC to HEX/HTML  (Read 6905 times)

niclar

  • Guest
EBC to HEX/HTML
« on: March 24, 2008, 03:50:25 PM »
Hi..

I'm messing around with a PHP script for parsing BeerXML, and would like to show the color the beer should have, and for that, i need some kind of table or a way to calculate EBC to a HEX code. As i'm a happy BeerSmith owner, i know that somebody smarter than med has cracked this nut. Could you maybe point me in a direction were to look for a simple solution?
-At least more simple than exporting a recipe with every possible EBC and copy the color from that  ;)

Cheers

Nicky Larstrup

Offline BeerSmith

  • Brewer, Author, Patriot
  • BeerSmith Administrator
  • BeerSmith Grandmaster Brewer
  • *****
  • Posts: 5598
  • BeerSmith - take the guesswork out of brewing!
    • BeerSmith
Re: EBC to HEX/HTML
« Reply #1 on: March 24, 2008, 05:42:18 PM »
Nicky,
  If you use the tag $RGB_COLOR in a template it will give you the hex color.

  However, I don't know a simple way to do what you describe without programming some kind of color table in PHP.  You could use the above tag to get several color samples and interpolate from there in a table.

Cheers!
Brad
Get a free trial of BeerSmith 3 here