Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.
Template:Color is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.
This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects:
This template is supported by WikiProject Color, a project that provides a central approach to color-related subjects on Wikipedia. Help us improve articles to good and 1.0 standards; visit the wikiproject page for more details.ColorWikipedia:WikiProject ColorTemplate:WikiProject Colorcolor
Interwiki
Latest comment: 9 years ago3 comments2 people in discussion
Latest comment: 9 years ago3 comments2 people in discussion
I notice the documentation here is missing a list of redirects, as present elsewhere.
In particular, I would like to ask for the documentation to note that Template: Colour is redirected here. In other words, that Wikipedia is fine with editors using their preferred spelling of this word when invoking templates. ~Without having to experiment on their own, as I had to. Thanks, ~~
— Preceding unsigned comment added by CapnZapp (talk • contribs) 06:14, 25 January 2014 (UTC)Reply
Latest comment: 1 year ago2 comments2 people in discussion
Firstly, apologies for writing in English if this is not your first language (this is an automated message).
This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.
To fix this:
Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`
If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.
For any questions feel free to ask them at phab:T369874.
Latest comment: 11 months ago1 comment1 person in discussion
@Theknightwho: Thank you for striving to improve Wikipedia.
Regarding this edit (and any others like it), apparently {{color}} does not function in dark mode, so Wikipedia's Spanish alphabet section said the letters that used to be part of the Spanish alphabet were shown in red, but displayed them in the same white as the rest of the alphabet. i switched that page back to this format
<span style="color: RED ">this format</span>
which seems to work in light or dark mode.
If any text on Wikipedia is supposed to be in non-default colors, editors need to know if the wiki code they use is going to work. i'm not sure where else to spread the word about this hiccup, though.
i tried to use {{!xt|this template}} to get a reddish color, but Preview replaced my text with a big bold reddish alert saying, "Template:!xt is only for examples of style and formatting. Do not use it in actual articles." If the {color} template can not be made to work in dark mode, could the {color} template be set to display an {!xt}-style Preview alert about {color} not working in dark mode?
Can these templates be used in right-to-left languages?
Latest comment: 3 months ago4 comments2 people in discussion
Reading Vav-consecutive, and as a non-Hebrew reader, I thought it might be useful if the examples could pick out the "vav" letter in a different colour, in the way that {{Red|red}} yields red. So I began to try to edit one of them. But I was unable to make it work. Here's one example from that article:
yôm wə-laylâ
יוֹם וְלַיְלָה
Day and night.
Is there a way to highlight that "vav" (the וְ in the middle).
Do these templates work with right-to-left languages?
Here you go: יוֹם וְלַיְלָה. It can be tricky to navigate a mix of left-to-right and right-to-left scripts, but after some trial and error, I was able to do it. —andrybak (talk) 18:12, 9 April 2026 (UTC)Reply
That's not what the WMF comment was stating, though; they were just stating how to fix it. What reasoning do you have that it shouldn't be allowed to work? ~ oklopfer (💬) 16:28, 29 June 2026 (UTC)Reply
The !important annotation is a cop-out. Usually, it means "I can't be bothered working out the proper specificity of the selectors, so I'll use a sledgehammer instead". --Redrose64 🌹 (talk) 21:24, 1 July 2026 (UTC)Reply
The !important is overriding Template:Color/styles.css, but I am wondering why that exists. phab:T360683 claims For obvious reason this is not compatible with night theme, but the reason is not obvious to me at all, nor is it clarified in the ticket comments. ~ oklopfer (💬) 23:31, 5 July 2026 (UTC)Reply
Ah, I think I understand the issue now. Many calls of this template were made before dark mode was a thing, and so specify dark text colors that create poor contrast ratios or are invisible in dark mode. The solution seems to have been disabling the feature in dark mode; a bit of a nuclear option, though I see why that was done. I'm inclined to revert the changes as requested with that in mind, but maybe we could workshop some leniency to allow the template to function outside of mainspace or something. Izno, could you advise? —TechnoSquirrel69 (talk) 03:11, 6 July 2026 (UTC)Reply
On pages like secondary color, it is rather necessary to have working. The old method was to force !important into the template call itself, which was a bit messy but better than the alternative of no color at all.
I think it is somewhat problematic to have it disabled on dark mode while still working on light, as editors often use colored text to make distinctions. These uses are problematic, and when I see them I often tag such pages or sections with {{overcoloured}}; but because I use dark mode I would not see them at all and be visually notified to tag them for fixing.
But yes, Izno it would be good to hear your thoughts, given that most seemed to refer to you in that discussion. ~ oklopfer (💬) 04:04, 6 July 2026 (UTC)Reply
I think the preference is clearly "ensure sure the text is accessible". While in dark mode, the only ways to do that are to override the color emitted or to add a white/light background for all uses. I rather think the second is disruptive to the dark mode existence, but I don't really care if consensus wants to do the other one. (You can override whichever in your Common.css if you should want to be notified when {{color}} is being used.)
To me, it's really just a matter of deprecating the template with some set of reasonable replacements. If someone wants to work on the 20k pages that use the template directly, I'm not stopping them, but it's definitely not on my list of things that I want to work on (or would be prioritizing even if I did).
I think I enumerated the reasonable replacements already, more or less. Stuff like "stonks go up" should probably have a {{it went up color}}. Stuff like "my brand colors" probably needs a brand color stylesheet (I sketched out an idea on the task) or for us to decide that we shouldn't care about brand colors (hah good luck but hey you can try to get them deprecated). Specific colors for colors pages probably should avoid the use of this template in favor of direct use of the color with an appropriate and accessible background, though I suppose a {{I really mean this color}} template could be devised, or an option added to this one to mean the same. This group is going to be the flat minority of all uses, so I don't think the template should support it as the default. Some subset can just be removed because they're decorative and have no obvious meaning.
Whether !important is relevant is a question of whether you can work around a selector. You cannot do so with inline styles, as this template emits. So, !important must be used. Izno (talk) 06:04, 6 July 2026 (UTC)Reply
So is this a visual issue regarding !important, a technical issue because it goes against a guideline of the template, or something else? I replace this template with specific color ones (for sport team wikilinks) and there have been zero complaints. — Dissident93(talk)18:07, 7 July 2026 (UTC)Reply
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.