Changes
Gradient to lighter bg color for readability in rarity 8 case
_template = [[{|class="${table_class}" id="${table_id}" style="border: 1px solid darkgray; width: 320px;"
_template = [[{|class="${table_class}" id="${table_id}" style="border: 1px solid darkgray; width: 320px;"
|-
|-
| colspan="6" style="position: relative; text-align: center; padding: 1px 40px; background-color: ${top_bg_color};" | <div style="position: absolute; right: 5px;">${edit_link}</div>
| colspan="6" style="position: relative; text-align: center; padding: 1px 40px; background-color: ${top_bg_color};${top_extra_style}" | <div style="position: absolute; right: 5px;">${edit_link}</div>
<p style="font-size:20px; text-shadow: ${text_shadow}">'''${name}'''</p>${localized_name}
<p style="font-size:20px; text-shadow: ${text_shadow}">'''${name}'''</p>${localized_name}
<p style="font-size:15px">'''No.${id} ${japanese_name}${nick}'''</p>
<p style="font-size:15px">'''No.${id} ${japanese_name}${nick}'''</p>
_common_background_color = "darkgrey",
_common_background_color = "darkgrey",
_background_color = "grey",
_background_color = "grey",
_rare_background_color = "#804040",
_rare_background_color = "#A04040",
_rare_background_image = "background-image: linear-gradient(to bottom, #804040, #A04040 80%, #A04040);",
_link_color = "black",
_link_color = "black",
_text_shadow_template = "0 0 ${radius} ${color}",
_text_shadow_template = "0 0 ${radius} ${color}",
local rarity = self._ship:rarity()
local rarity = self._ship:rarity()
local bg_color
local bg_color
local extra_style = ""
if rarity then
if rarity then
if rarity >= 4 and rarity <= 7 then
if rarity >= 4 and rarity <= 7 then
else
else
bg_color = self._rare_background_color
bg_color = self._rare_background_color
extra_style = self._rare_background_image
end
end
else
else
table.insert(text_shadows, format{self._text_shadow_template, radius = radius, color = color})
table.insert(text_shadows, format{self._text_shadow_template, radius = radius, color = color})
end
end
self._vars.top_bg_color, self._vars.text_shadow = bg_color, table.concat(text_shadows, ", ")
self._vars.top_bg_color, self._vars.text_shadow, self._vars.top_extra_style = bg_color, table.concat(text_shadows, ", "), extra_style
end
end