lib/write_xlsx/utility.rb in write_xlsx-1.11.0 vs lib/write_xlsx/utility.rb in write_xlsx-1.11.1
- old
+ new
@@ -339,11 +339,11 @@
end
#
# Write the <color> element.
#
- def write_color(writer, name, value) # :nodoc:
+ def write_color(name, value, writer = @writer) # :nodoc:
attributes = [[name, value]]
writer.empty_tag('color', attributes)
end
@@ -749,11 +749,11 @@
def palette_color(index)
# Adjust the colour index.
idx = index - 8
- rgb = @palette[idx]
- sprintf("%02X%02X%02X", *rgb)
+ r, g, b = @palette[idx]
+ sprintf("%02X%02X%02X", r, g, b)
end
#
# Workbook の生成時のオプションハッシュを解析する
#