https://stackoverflow.com/questions/8318911/why-does-html-think-chucknorris-is-a-color
Q. Why does HTML think “chucknorris” is a color?
Q. 왜 'chucknorris'를 색깔로 취급하나요?
How come certain random strings produce colors when entered as background colors in HTML? For example:
HTML에서 그냥 랜덤한 문자열이 어떻게 색깔을 나타내는 거죠??
<body bgcolor="chucknorris"> test </body>
..produces a document with a red background across all browsers and platforms.
모든 창을 빨간색으로 바꿔버려요..
Interestingly, while chucknorri
produces a red background as well, chucknorr
produces a yellow background.
흥미로운건, chucknorri
도 빨간 배경을, chucknorr
는 노란 배경을 만들어요.
What’s going on here?
도대체 무슨일이 생기는거죠?>???><>?<<>?>?
It’s a holdover from the Netscape days:
넷스케이프 시절의 잔재라고 할 수 있겠군여 쿸쿠.
Missing digits are treated as 0[...]. An incorrect digit is simply interpreted as 0. For example the values #F0F0F0, F0F0F0, F0F0F, #FxFxFx and FxFxFx are all the same.
숫자로 나오지 않는 것들은 0 으로 취급합니다. 불확실한 숫자들도 0으로 해석 되죠. 예를 들어.
#F0F0F0, F0F0F0, F0F0F, #FxFxFx and FxFxFx 이것들은 모두 같게 취급 됩니다.
If we apply the rules, we get the following:
자 이 규칙을 적용해 보도록 하죠.
1. Replace all nonvalid hexadecimal characters with 0’s:
1. 16진법에 맞지 않는 것들을 0으로 교체 합시다.
chucknorris becomes c00c0000000
c00c 0000 0000
RGB (c00c, 0000, 0000)
RGB (c0, 00, 00) = #C00000 or RGB(192, 0, 0)
This also answers the other part of the question:
이것이 다른 질문들의 답이기도 하죠
Why does bgcolor="chucknorr"
produce a yellow colour?
왜 bgcolor="chucknorr"
는 노란색을 배경에 칠하는 가?
Well, if we apply the rules, the string is:
자. 규칙에 한 번 넣어보면
c00c00000 => c00 c00 000 => c0 c0 00 [RGB(192, 192, 0)]
Which gives a light yellow gold colour.
노란 색을 이루네요.
As the string starts off as 9 characters, we keep the second ‘C’ this time around, hence it ends up in the final colour value.
문자열이 9개의 캐릭터로 이루어져 있고. 두번째로 나오는 C를 가져가면서 노란색이 만들어 지네요.
https://z-p42.www.instagram.com/p/B_NKYuSgibo/c/17872971086024762/?hl=tr