@@ -72,11 +72,16 @@ Elm.Native.Graphics.Text = function(elm) {
73 function size(px, text) { return addStyle('font-size', px + 'px', text) }
73 function size(px, text) { return addStyle('font-size', px + 'px', text) }
74 var header = addTag('h1');
74 var header = addTag('h1');
75− function height(h, text) { return addStyle('font-size', hf+'em', text) }
75+ function height(h, text) { return addStyle('font-size', h+'em', text) }
76 function italic(text) { return addStyle('font-style', 'italic', text) }
76 function italic(text) { return addStyle('font-style', 'italic', text) }
77 var bold = addTag('b');
77 var bold = addTag('b');
79+ function extract(c) {
80+ if (c._3 === 1) { return 'rgb(' + c._0 + ',' + c._1 + ',' + c._2 + ')'; }
81+ return 'rgba(' + c._0 + ',' + c._1 + ',' + c._2 + ',' + c._3 + ')';
78 function color(c, text) {
83 function color(c, text) {
79− return addStyle('color', Color.extract(c), text);
84+ return addStyle('color', extract(c), text);
81 function underline(text) { return addStyle('text-decoration', 'underline', text) }
86 function underline(text) { return addStyle('text-decoration', 'underline', text) }
82 function overline(text) { return addStyle('text-decoration', 'overline', text) }
87 function overline(text) { return addStyle('text-decoration', 'overline', text) }