Module talk:Color contrast: Difference between revisions

Content deleted Content added
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}.
Line 68:
::: Yes I saw that. But because the category was being added via {{tl|Sandbox other}} and now is added directly via [[Module:Color contrast/doc]], that becomes effectively a different transclusion and the usual caveats about delays because of cached transclusions apply. --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 16:56, 7 January 2021 (UTC)
::::{{tlf|Sandbox other}} should be checked for Module ns then? But [https://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Template%3ASandbox+other&namespace=828 here] it seems to work. (To be clear: before my edit the category was empty, and no delay was working, no recent edits). I'll leave it for now. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:18, 7 January 2021 (UTC)
 
== Template-protected edit request on 18 March 2025 ==
 
{{edit template-protected|Module:Color contrast|answered=no}}
Line 135:
{{td| local c2 {{=}} args[2] or '#FFFFFF'| local c2 {{=}} args[2] or 'white'}}
Line 137:
{{td| local c3 {{=}} args[3] or '#000000'| local c3 {{=}} args[3] or 'black'}}
Change the specification of the default colors from hex triplets <syntaxhighlight lang="lua" inline>'#FFFFFF'</syntaxhighlight> and <syntaxhighlight lang="lua" inline>'#000000'</syntaxhighlight> to named HTML colors <syntaxhighlight lang="lua" inline>'white'</syntaxhighlight> and <syntaxhighlight lang="lua" inline>'black'</syntaxhighlight> respectively. This allows the default case to take advantage of the pre-computed table of relative luminances of named HTML colors at [[Module:Color contrast/colors]] checked by the <code>color2lum()</code> function instead of calculating the relative luminances of white and black every time (as the module as currently written does), as well as, at least for the default colors, avoiding a parser bug that causes output that begins with <code>#</code> to result in a numbered list. '''[[User:Kinsio|<span style="color:#df0000">Kinsio</span>]]''' <span style="color:#096450">('''''[[User talk:Kinsio|talk]]''''' ★ '''''[[Special:Contributions/Kinsio|contribs]]''''' ★ '''''[[Special:UserRights/Kinsio|rights]]''''')</span> 18:55, 19 March 2025 (UTC)