TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

My favourite colour is Chuck Norris red

519 点作者 OuterVale5 个月前

30 条评论

liontwist5 个月前
This article appears to be recycling content from a 13 year old top stack overflow question:<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;8318911&#x2F;why-does-html-think-chucknorris-is-a-color" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;8318911&#x2F;why-does-html-th...</a><p>Truly any interesting thing ever created on the internet will be exploited for marketing until the end of time. Unfortunate that old redditors and other forum contributors were not able to capture the millions of dollars of value created from their work.<p>EDIT: I did see it’s at least referenced at the end.
评论 #42474839 未加载
评论 #42471351 未加载
inopinatus5 个月前
My favourite outcome is that &#x27;chocolate&#x27; is reduced to &#x27;#c0c0a0&#x27;
评论 #42469068 未加载
interactivecode5 个月前
I love how forgiving the web is. These days you can get strictness with typescript and the like, which is great for businesses and work. But the forgiving nature of html and css and even javascript has contributed to so much adoption. Plus grew one of the most important things in an platform the ecosystem itself. Seeing rust slow down with piles of crates and fall into the same issues, js and npm has, perhaps its not a language problem but a ecosystem size problem. Larger user base === larger problems<p>If you really want pedantic strictness and perfection, native applications are the place to work. But it isnt always better.<p>And the web is fast, like really fast in rendering highly markedup text layouts. Just because everyone uses a frontend framework for “maintainability” doesn’t mean the engine is slow.
评论 #42469913 未加载
评论 #42470347 未加载
评论 #42470289 未加载
评论 #42470362 未加载
评论 #42470127 未加载
codelikeawolf5 个月前
This was a good read, but the author is mistaken: chucknorris isn&#x27;t rendered as red, red is rendered as chucknorris.
devmor5 个月前
This reminded me of one of my first web-dev projects as a teenager - the first one I showed my (recently passed) father, in which you were prompted to ask &quot;Chuck Norris&quot; a yes or no question with a text box, and then would present you a yes or no answer with a suitable photo of the man himself.<p>I did some rudimentary string parsing on submit, and if the question started with a word like &quot;Where&quot;, &quot;How&quot;, &quot;Why&quot;, &quot;Who&quot; and a few other words that signified the question couldn&#x27;t be answered with Yes or No, it would show an angry photo of his face with the caption &quot;Your question has angered chuck!&quot; - I think I also gave it a 1% chance to randomly roll that result regardless.<p>My dad absolutely loved that little project, and reminded me of how funny he found it even this year shortly before we lost him, almost 2 decades after I&#x27;d made it.<p>Sorry this wasn&#x27;t incredibly related to your submission, but I wanted to share a happy memory you just brought back to me with it.
评论 #42468992 未加载
myk90015 个月前
&gt; Chuck Norris isn&#x27;t a colour.<p>But the browser is too afraid to point that out.<p>(Sorry, I&#x27;ll show myself out)
thih95 个月前
This means we can treat &quot;o&quot; as &quot;0&quot; (zero) because it gets automatically substituted like this anyway. E.g.:<p><pre><code> coffee </code></pre> actually becomes:<p><pre><code> #c0ffee </code></pre> Same with baobab (#ba0bab), decode (#dec0de), etc.
评论 #42469728 未加载
kiru_io5 个月前
Color names are a strange thing, it is like given names to numbers. I made a game out of it [0].<p>[0] <a href="https:&#x2F;&#x2F;colorguesser.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;colorguesser.com&#x2F;</a>
评论 #42471259 未加载
评论 #42471204 未加载
评论 #42469541 未加载
评论 #42470017 未加载
djoldman5 个月前
&gt; I&#x27;ve heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow &#x27;bad&#x27;. I think a perfect web would be a boring web. I certainly wouldn&#x27;t be here writing were it &#x27;perfect&#x27;. It&#x27;s about making the web work, no matter what we throw at it, and I wouldn&#x27;t have it any other way.<p>It&#x27;s probably less about &quot;perfection&quot; than precluding non-conformance to a standard from the beginning. The tale of imperfect beginnings to standards that haunt the world for decades repeats itself ad nauseam. In short, if one is clever enough to engineer a relatively future-proof standard, then one avoids (possibly substantial) wasted developer hours.<p>Note: This is NOT easy and things are sometimes obvious and unforgiving in hindsight.
评论 #42470921 未加载
mrob5 个月前
&gt;I&#x27;ve heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow &#x27;bad&#x27;.<p>Considering all the misery inflicted by computer crime that&#x27;s enabled by the forgiving attitude, I 100% agree. And given the choice between &quot;you can still visit the Space Jam website[0]&quot; or &quot;never worry about drive-by ransomware again&quot;, I&#x27;m pretty sure I&#x27;d be with the majority in choosing the latter. Security is a heavy price to pay for whimsy. Old-technology hobbyists could still run old web browsers in sandboxed VMs.<p>[0] <a href="https:&#x2F;&#x2F;www.spacejam.com&#x2F;1996&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.spacejam.com&#x2F;1996&#x2F;</a>
评论 #42469439 未加载
评论 #42469570 未加载
评论 #42470441 未加载
评论 #42470120 未加载
flobosg5 个月前
Unintended rubrication, perhaps? – <a href="https:&#x2F;&#x2F;gwern.net&#x2F;red" rel="nofollow">https:&#x2F;&#x2F;gwern.net&#x2F;red</a>
评论 #42468873 未加载
peutetre5 个月前
&gt; <i>After all, in a perfect web, &quot;chucknorris&quot; would just be another error message</i><p>Chuck Norris has only ever received one error message. He stared the computer down until it apologized and fixed the problem.
sneak5 个月前
&gt; <i>The web is built on this foundation of resilience, both in technology and ethos. It&#x27;s what allows a website from 1996 to still render in a modern browser. It&#x27;s what lets a page load even when half the CSS is invalid. It&#x27;s what makes it magic.</i><p>The concept of graceful degradation in web feature support is dead now. Presently most of the web fails to render at all if you don’t execute a giant javascript blob in full that is responsible for putting the words on the page. It’s quite sad.
Darthy5 个月前
The parsing outline in the article omits that there are also 140 hard coded color names in html: <a href="https:&#x2F;&#x2F;htmlcolorcodes.com&#x2F;color-names&#x2F;" rel="nofollow">https:&#x2F;&#x2F;htmlcolorcodes.com&#x2F;color-names&#x2F;</a>
esperent5 个月前
The included codepen is unreadable on mobile until you remove -webkit-text-stroke from them CSS.<p>At the initial value of 0.5rem it gives a quite cool effect, as if the text has been badly redacted with a white highlighter. I initially thought that was intentional.
评论 #42469431 未加载
评论 #42469135 未加载
orko5 个月前
&quot;smurf&quot; gives a nice #0000f0, ain&#x27;t that funny?
paradite5 个月前
Back the in the days I used a lot of d3.js for making visualizations.<p>Till today my favorite color for background, secondary text is still d3d3d3.
bartread5 个月前
&gt; If an octothorpe (#) is located at the start of the value, it&#x27;s removed.<p>An “octothorpe”! I never knew it was called that (and, apparently, neither does autocorrect). What a glorious name!
评论 #42469529 未加载
gdv__5 个月前
A while ago I made this app that lets you pick a color and find an English word that gives a similar color: <a href="https:&#x2F;&#x2F;g-dv.gitlab.io&#x2F;color-namer" rel="nofollow">https:&#x2F;&#x2F;g-dv.gitlab.io&#x2F;color-namer</a>
qoez5 个月前
Feels like being back in 2012 all over again reading this
dbbr5 个月前
The moment I&#x27;ve been waiting for: for a topic on HN to devolve into Barrens chat. This is going to be a great day. Zug zug.
评论 #42471345 未加载
mukunda_johnson5 个月前
I&#x27;m surprised this is well defined behavior.
评论 #42469069 未加载
评论 #42468850 未加载
psychoslave5 个月前
Excellent!<p>&quot;green&quot; is green, but my favorite is &quot;peace&quot; actually.
评论 #42470492 未加载
maxim-fin5 个月前
&lt;font color=&quot;chuck&quot;&gt;Also just a name &quot;Chuck&quot; isn&#x27;t a colour.&lt;&#x2F;font&gt;
ilaksh5 个月前
This doesn&#x27;t work with CSS, right? Only the color attribute of HTML.
评论 #42468671 未加载
评论 #42468658 未加载
jackallis5 个月前
could not help my self: Chuck Norris doesn’t see red; red sees Chuck Norris. Sorry another one, The color red was invented to match Chuck Norris&#x27;s intensity.
AnonC5 个月前
It’s amusing that some of the other (English) word colors match what one would consider suitable or kinda close to those words.<p><pre><code> crap #c0a000 watermelon #a00e00 plant #00a000 sonic #0000c0 jade #0ade00 bloodily #b00d00 grass #00a000 midnight #0d00000 </code></pre> Has anyone created a more comprehensive list of such (unexpected) color words for English and other languages?
评论 #42468687 未加载
评论 #42468707 未加载
soheil5 个月前
you can use your name as a semi-unique color to you
soheil5 个月前
mine is crap beige
bombela5 个月前
I can only think of one thing. The computational overhead of this parsing insanity.<p>With the size of modern web pages and the scale. This must amount to a very significant cost.
评论 #42469634 未加载
评论 #42469614 未加载
评论 #42470102 未加载