Template talk:Chapters: Difference between revisions
(reply to User:popcorn.) |
Thunder4ik (talk | contribs) m (→Top row background color: Unicodifying) |
||
Line 11: | Line 11: | ||
}} | }} | ||
|- | |- | ||
| | | ↓ | ||
|- | |- | ||
| | | |
Revision as of 06:01, 7 January 2024
Top row background color
{{table | {{tr | {{th|colspan=3|bgcolor=rgba(0,0,0,0.5)|{{hl2|4}} Chapters}} | bgcolor={{{{{game|hl2}}}|col}} }} <!-- ... --> }} | |||
↓ | |||
|
Apparently you'd like to use a fitting background color for the top row for each game. Instead of hard coding it for each game, like #403305 that you used for hl2, you can - if it fits to your plans - make use of {{hl2|col}}
for that matter, or more precisely: {{{{{game}}}|col}}
. Using this, the background color adapts to the {{{game}}}. Using a second half transparent black background color, you can darken the game's color. This should work out as long as the game color is not too dark. :)
In addition, this would mean that you don't need to #switch for the game right at the beginning of the template (in which case you could also just make a template for each game's chapters), instead after the table's top row. That should decrease redundance at least a bit.
--popcorn (talk) 14:38, 25 July 2023 (PDT)