9 ms·
My favourite colour is Chuck Norris red
- mukunda_johnson 2y agoI'm surprised this is well defined behavior.
- zahlman 2y agoI already saw the Stack Overflow reference cited in the article (https://stackoverflow.com/questions/8318911 https://stackoverflow.com/questions/8318911) many years ago, so I wasn't surprised. But I guess I can still be disappointed. Postel's Law has its limits.
- creatonez 2y agoIt certainly is now (HTML5 retroactively standardized a lot of quirks), but it wasn't always well-defined: https://scrappy-do.blogspot.com/2004/08/little-rant-about-microsoft-internet.html https://scrappy-do.blogspot.com/2004/08/little-rant-about-mi...
- ilaksh 2y agoThis doesn't work with CSS, right? Only the color attribute of HTML.
- esperent 2y agoYeah it addresses that towards the end of the article. CSS has different rules for parsing badly formatted colors. Unsurprising given that CSS colors can be in several different formats (hex, RGB, RGBA, HCL etc.).
- debo_ 2y agoFrom the article: > CSS has its own set of fascinating peculiarities when it comes to handling invalid colour values. Most modern browsers will clamp values rather than reject them outright -– throw rgb(300, -50, 1000) at a browser and it won't fail; it'll helpfully transform it into rgb(255, 0, 255).
- threeseed 2y ago[flagged]
- AnonC 2y agoIt’s amusing that some of the other (English) word colors match what one would consider suitable or kinda close to those words. crap #c0a000 watermelon #a00e00 plant #00a000 sonic #0000c0 jade #0ade00 bloodily #b00d00 grass #00a000 midnight #0d00000 Has anyone created a more comprehensive list of such (unexpected) color words for English and other languages?
- OakNinja 2y agoThis is an old favorite of mine: http://bada55.io/ http://bada55.io/
- furyofantares 2y agowell, there's those plus a few more in the article
- inopinatus 2y agoMy favourite outcome is that 'chocolate' is reduced to '#c0c0a0'
- esperent 2y agoThe included codepen is unreadable on mobile until you remove -webkit-text-stroke from them CSS. 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.
- aetherspawn 2y agoWorks fine on iOS. It basically adds a white scribbly outline to the text which makes it easy to read the black text regardless of the background color. It actually looks fantastic for such a low effort effect.
- jvdvegt 2y agoWorks fine on Android too, with Firefox.
- flobosg 2y agoUnintended rubrication, perhaps? – https://gwern.net/red https://gwern.net/red
- f1shy 2y agoThank you. This happens to be invaluable to me!
- paradite 2y agoBack the in the days I used a lot of d3.js for making visualizations. Till today my favorite color for background, secondary text is still d3d3d3.
- peutetre 2y ago> After all, in a perfect web, "chucknorris" would just be another error message Chuck Norris has only ever received one error message. He stared the computer down until it apologized and fixed the problem.
- devmor 2y agoThis 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 "Chuck Norris" 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. I did some rudimentary string parsing on submit, and if the question started with a word like "Where", "How", "Why", "Who" and a few other words that signified the question couldn't be answered with Yes or No, it would show an angry photo of his face with the caption "Your question has angered chuck!" - I think I also gave it a 1% chance to randomly roll that result regardless. 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'd made it. Sorry this wasn't incredibly related to your submission, but I wanted to share a happy memory you just brought back to me with it.
- fooker 2y agoThis reminds me of the early web. So many fun websites like this. Now it's just silos controlled by megacorps, trying to outdo each other in competition for attention.
- b112 2y agoWell yes and no. I assure you, many many forums exist outside of Facebook, and mailing lists too. And endless, classic, non-https sites still exist too. They are just pages deep in Google's search results, especially with the entire first several pages of scrolling being their almost always wrong suggestions. And it doesn't help that verbatim is completely broken now, and that Google aliases search terms, and drops search terms, even when using quotes. A horrible design, and the result is all that goodness is harder to find. It's not siloed, it's Google only
- thih9 2y agoThis means we can treat "o" as "0" (zero) because it gets automatically substituted like this anyway. E.g.: coffee actually becomes: #c0ffee Same with baobab (#ba0bab), decode (#dec0de), etc.
- cubefox 2y agoInteresting. There are also differences between HTML and CSS: #fe11a710 becomes a sort of red in HTML, but a mostly transparent pink in CSS (for 8 digits hex numbers, the last two encode the alpha value).
- deleted 2y ago[deleted]
- kiru_io 2y agoColor names are a strange thing, it is like given names to numbers. I made a game out of it [0]. [0] https://colorguesser.com/ https://colorguesser.com/
- alex_duf 2y agothat was fun! It would be nice to show my colour next to the result to compare a little more.
- Yujf 2y agoHah I played twice and did not meaningfully inprove my score. Even after seeing the color I could not match it up close enough, and the first time I got pretty close to most colors.
- istjohn 2y agoI would love this with a limited, accurate color list. It would be a fun way to learn more obscure colors like chartreuse, ochre, and sienna. I'd particularly like to learn the colors that are likely to come up in literature (e.g., [0]). As it is, I got "Jaycey's Favorite" as one of the colors. 0. https://www.vocabulary.com/lists/141957 https://www.vocabulary.com/lists/141957
- ksymph 2y ago> How is the score calculated? Oh man, this was harder than I thought. Color is such a deceptively dangerous rabbit hole. A few months ago I entered a game jam intending to make a small pokemon-like where you collect colors rather than creatures. E.g. instead of fire>grass>water it would be red>green>blue, with randomly generated colors of any shade and about half a dozen 'types'. Trying to figure out the math of that nerd sniped me for a couple weeks, didn't even get started on the rest of the game before the jam ended.
- psychoslave 2y agoExcellent! "green" is green, but my favorite is "peace" actually.
- TonyTrapp 2y ago"red" is blue, and "blue" is red!
- bartread 2y ago> If an octothorpe (#) is located at the start of the value, it's removed. An “octothorpe”! I never knew it was called that (and, apparently, neither does autocorrect). What a glorious name!
- richrichardsson 2y agoI wonder why it ended up being "hash-tag" on social media when it's quite common for North Americans to refer to the symbol as the "pound symbol"?
- bartread 2y agoYeah, it’s an interesting one. I’ve always known it as the hash symbol from back in the 80s when I got my first microcomputer. This was in the UK but I don’t think hash is UK-specific terminology: “shebang” (“hash bang” for #!) has been common parlance amongst the UNIX-crowd since I don’t know when. I know pound is incredibly common in the US, but in the UK it’s never referred to that way because here pound means £. “Octothorpe” is entirely new to me though, and I guess is quite context specific?
- dcminter 2y agoYeah, I don't think I even heard "pound" for # until I went online and started getting exposed a lot more to US stuff (also harking from the 80s UK micro world). I feel like "octothorpe" might have been referenced in the jargon file or similar texts?
- dcminter 2y agoI checked, and it gets a passing mention (along with a snipe about annoying Britons!) in Jargon File and Hackers Dictionary.
- a57721 2y ago> “shebang” (“hash bang” for #!) I think the etymology of "shebang" isn't clear, some sources say it may come from "sharp bang" or "shell bang". http://catb.org/jargon/html/S/shebang.html http://catb.org/jargon/html/S/shebang.html
- orko 2y ago"smurf" gives a nice #0000f0, ain't that funny?
- bombela 2y agoI can only think of one thing. The computational overhead of this parsing insanity. With the size of modern web pages and the scale. This must amount to a very significant cost.
- bartread 2y agoNot really. The color attribute isn’t commonly used these days - it’s literally legacy support - and, even on pages where it is used, it’s going to be a tiny portion of the overall markup. Also worth bearing in mind that parsing markup is fast, and certainly not the reason web pages can feel slow. That’s much more to do with heavy assets, poorly constructed JavaScript, long-running web service calls, excessive DOM manipulation and re-rendering, bandwidth constraints, etc. Parsing the markup on its own isn’t going to be the root cause of a meaningful fraction of web performance issues.
- lblume 2y agoHighly unlikely. The parsers are written in efficient languages, and nobody is setting <font> color attributes in a loop. Also, this is not how it is done today, and old websites are usually a lot faster than modern ones. I would even argue that the parsing CSS's color syntax is way more expensive than this comparatively simple step-by-step algorithm.
- Sesse__ 2y ago> and nobody is setting <font> color attributes in a loop. You would be surprised! For instance, MotionMark, one of the main web benchmarks, keeps mutating CSS colors directly on (thousands of) elements to animate them, every frame.
- Cthulhu_ 2y agoThe problem there is that there's a lot of sanity checking happening in browsers; I hope there will be a new technology where things like html, css and JS are all precompiled / pre-verified so the page is executed as-is with minimal sanity checking. There was a post yesterday about Python's random() vs randint; the former just spits out a random number, the latter does a list of sanity checks on the arguments passed, whose cost adds up in many invocations. But that's a runtime sanity check, if that can be done beforehand with e.g. a stricter type system + a "let it crash / fail" attitude at runtime, all that sanity checking overhead would be gone. I mean this script / at-runtime checking is fine during development if it means shorter iterations and whatnot, but in production it shouldn't happen.
- mrob 2y ago>I've heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow 'bad'. Considering all the misery inflicted by computer crime that's enabled by the forgiving attitude, I 100% agree. And given the choice between "you can still visit the Space Jam website[0]" or "never worry about drive-by ransomware again", I'm pretty sure I'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. [0] https://www.spacejam.com/1996/ https://www.spacejam.com/1996/
- gizmo 2y agoIt's a false choice in any case. Web browsers can support backward compatibility and at the same time offer a strict mode that benefits correctness and performance. Some real opportunities were missed to clean up JS semantics when Modules got introduced, for instance.
- winternewt 2y agoAnd they did with XHTML, but unfortunately it didn't catch on.
- josefx 2y ago> Considering all the misery inflicted by computer crime that's enabled by the forgiving attitude, I 100% agree. Parsers should strictly adhere to a standard, if the standard says they should be "forgiving" and that "forgiving" is well defined then all parsers should act this way. Inconsistent behavior between implementations opens its own can of worms that may leave a system in an inconsistent or insecure state.
- yread 2y agoI think the choice is more "writing a browser is a weekend project" vs "writing a browser is years of toil and you'll need a local copy of the internet to test it comprehensively"
- Thorrez 2y agoI don't see how making browsers less forgiving would reduce drive-by ransomware. I don't think most browser vulnerabilities are related to the web being forgiving.
- sneak 2y ago> The web is built on this foundation of resilience, both in technology and ethos. It's what allows a website from 1996 to still render in a modern browser. It's what lets a page load even when half the CSS is invalid. It's what makes it magic. 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.
- interactivecode 2y agoI 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 If you really want pedantic strictness and perfection, native applications are the place to work. But it isnt always better. 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.
- highwaylights 2y agoI do appreciate all of what you’ve said but the author of this piece is actually mistaken. The browser isn’t actually processing the string “chucknorris” and forgiving incorrectly provided hex codes, which is a common misconception. What actually happens within the rendering pipeline is that the full literal string (in this case, “chucknorris”) is parsed, and the browser attempts to render the tag in the colour of blood in hope of receiving the mercy that Chuck Norris doesn’t have. As said, it’s a common misconception and I’m glad I could clear it up before he reads this.
- afandian 2y agoAnd, inevitably, the next generation [0] comes along and use the colour without having any idea of who Chuck Norris even was. [0] https://news.ycombinator.com/item?id=42461264 https://news.ycombinator.com/item?id=42461264
- SamBam 2y agoThis will keep His spirit alive, like an Old God who is fed by our unknowing adherence to traditions, hanging glass baubles on Christmas trees in a pale reflection of hanging the heads of our sacrificed enemies, yet still providing a drop of sustenance to the sleeping Gods.
- myk9001 2y ago> Chuck Norris isn't a colour. But the browser is too afraid to point that out. (Sorry, I'll show myself out)
- soheil 2y agomine is crap beige
- soheil 2y agoyou can use your name as a semi-unique color to you
- maxim-fin 2y ago<font color="chuck">Also just a name "Chuck" isn't a colour.</font>
- Darthy 2y agoThe parsing outline in the article omits that there are also 140 hard coded color names in html: https://htmlcolorcodes.com/color-names/ https://htmlcolorcodes.com/color-names/
- deleted 2y ago[deleted]
- gdv__ 2y agoA while ago I made this app that lets you pick a color and find an English word that gives a similar color: https://g-dv.gitlab.io/color-namer https://g-dv.gitlab.io/color-namer
- djoldman 2y ago> I've heard people quip that browsers should be less forgiving and enforce perfection. That allowing jank makes the web somehow 'bad'. I think a perfect web would be a boring web. I certainly wouldn't be here writing were it 'perfect'. It's about making the web work, no matter what we throw at it, and I wouldn't have it any other way. It's probably less about "perfection" 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. Note: This is NOT easy and things are sometimes obvious and unforgiving in hindsight.
- gedy 2y agoXHTML tried this approach, but it failed for this and other reasons.
- lmm 2y agoOr maybe it failed entirely for the "other reasons", and this particular part of its design was actually right.
- gedy 2y agoWell at the time, I do know that the vast majority of complaints I heard from colleagues was that it breaks too easily and wouldn't render after that.
- 6510 2y agoI cant remember but I had a list of unsolvable problems that just ruled it out. I think in one instance I wanted to populate a form after it failed validation but couldn't correctly escape the value attributes. I believe the biggest design flaw is that the data is the first document it loads. It doesn't work like that. The application should load first, then the ui logic, then the data and then you should get to load other data sets. Swap them, filter, join, merge etc You would get powerful applications with very little effort.
- liontwist 2y agoThis article appears to be recycling content from a 13 year old top stack overflow question: https://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color https://stackoverflow.com/questions/8318911/why-does-html-th... 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. EDIT: I did see it’s at least referenced at the end.
- BeFlatXIII 2y ago> Unfortunate that old redditors and other forum contributors were not able to capture the millions of dollars of value created from their work. It's all down to a lack of viable micropayment infrastructure. See also: ad tech.
- nemomarx 2y agoI think a lot of forum posters wouldn't want to charge micro payments for it though?
- sieabahlpark 2y ago[dead]
- kibwen 2y agoMicropayments exist in apps, and yet that hasn't done anything to stop apps from having both micropayments while also being infested with ads. It's time to dispense with the myth that micropayments were a missed opportunity for the web. Commercialization enshittified the web, and micropayments would have just accelerated that decline.
- hnuser123456 2y agoMarketing? I don't see anything for sale or even any ads on the blog page.
- jackallis 2y agocould 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's intensity.
- JimmyWilliams1 2y ago[dead]
- qoez 2y agoFeels like being back in 2012 all over again reading this
- codelikeawolf 2y agoThis was a good read, but the author is mistaken: chucknorris isn't rendered as red, red is rendered as chucknorris.
- dbbr 2y agoThe moment I've been waiting for: for a topic on HN to devolve into Barrens chat. This is going to be a great day. Zug zug.
- moopie 2y agoI’d prefer if the discussion was about how homophobic chuck Norris is.
- deleted 2y ago[deleted]