理解十六进制html颜色代码的直观方法?

发布于 2024-07-07 22:01:31 字数 43 浏览 8 评论 0原文

是否有一种直观的方法或好的助记符来理解颜色与其十六进制值之间的对应关系?

Is there an intuitive way, or a good mnemonic, for understanding the correspondence between colors and their hexadecimal values?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

海螺姑娘 2024-07-14 22:01:32

我不确定你的意思,但我总是记得它是 RGB 颜色:前两位数字代表红色,第二对数字代表绿色,最后一对数字代表蓝色。

像这样:#RRGGBB

当然,要记住数字越小,颜色越深。

如果您正在寻找某种方法来记住橙色的颜色代码,恐怕您不走运。 我总是需要查一下那个...

I'm not sure what you mean, but I always remember that it is an RGB colour: The first two digits are for red, the second pair is for green and the las ones are for blue.

like this: #RRGGBB

And of course trying to remember that lower numbers give darker coulours.

If you are looking for some way to remember the colour code for orange, I'm afraid you are out of luck. I always need to look that one up...

り繁华旳梦境 2024-07-14 22:01:32

十六进制颜色的形式为#RRGGBB,其中 RR 为红色,GG 为绿色,BB 为蓝色。 由于它们是十六进制,因此范围为 00-FF。 由此应该很容易判断出您正在处理的颜色类型,例如#FF12A3 将是相当红色的。

Hexadecimal colours are of the form #RRGGBB where RR is red, GG is green and BB is blue. Since they're hexadecimal they range from 00-FF. It should be fairly easy from that to gauge roughly what kind of colour you're dealing with for example #FF12A3 is going to be fairly red.

十六岁半 2024-07-14 22:01:32

将颜色分解为代表红色、绿色和蓝色的三元组值。 每个段中的十六进制值越高,则该颜色的数量越多。 所以#000000是黑色,#FF0000是全红色,#FF00FF是紫色等等。

Break the colour up into a triplet of values that represent red, green and blue. The higher the hex value in each segment then the more of that colour there is. So #000000 is black, #FF0000 is all red, #FF00FF is purple etc.

套路撩心 2024-07-14 22:01:32

我认为获取一个好的 HTML 颜色图表并将其放在办公桌旁很有用。 我喜欢 Visibone 鼠标垫和海报。

I think it's useful to get a good HTML color chart and keep it by your desk. I like the Visibone mouse pads and posters.

为你鎻心 2024-07-14 22:01:32

请记住:

1) 六对的顺序是红、绿、蓝。 这很容易记住,因为我们经常谈论 RGB 颜色、RGB 屏幕等。

2) 数字应解释为颜色中的光量。 所以 00 是没有光,而 FF 是该颜色的最大光。

3)我所有三种颜色都处于同一水平,它们“相互抵消”,所以我们得到灰度颜色。 00 是最小光,如果所有三种颜色都是 00,我们就得不到光 - 即。 黑色的。 如果所有三种颜色都是最大光(#FFFFFF),我们会得到白色,中间的任何数字都是灰色。

Remember:

1) The order of the hex-pairs are Red, Green and Blue. This is easy to remember since we aften talk about RGB-color, RGB screens and so on.

2) The numbers should interpreted as the amount of light in the color. So 00 is no light, while FF is maximum light in that color.

3) I all three colors are of the same level, they "cancel each other out", so we get a greyscale color. 00 is minimum light, så if all three colors are 00 we get no light - ie. black. If all three colors are max-light (#FFFFFF) we get white, Any number in between is grey.

§普罗旺斯的薰衣草 2024-07-14 22:01:32

嗯,显示器使用“RGB”配色方案。 十六进制数中颜色的顺序是 RRGGBB。 因此,只要记住配色方案的名称就可以知道什么在哪里。 然后你可以将#RRGGBB解析为三个数字RR、GG和BB。

数字越高,该特定组件越亮。

那么你只需要记住小学的加色轮即可。 ;)

Well, monitors use an 'RGB' colorscheme. The order of the colors in the hexadecimal number is RRGGBB. So just remembering the name of the colorscheme tells you what goes where. Then you can parse the #RRGGBB as three numbers RR, GG and BB.

The higher the number the brighter that particular component.

Then you just need to remember the additive color wheel from grade school. ;)

天气好吗我好吗 2024-07-14 22:01:32

经过大量练习,我现在能够直观地创建颜色(当然,经过一些尝试和错误)。 播放/使用颜色混合器(例如使用红色/绿色/蓝色滑块)有助于理解关系。 现在,我知道 FFFF00 是黄色,FF00FF 是洋红色,00FFFF 是青色,当然还有原色,所有其他颜色都在两者之间。

I manage to create colors intuitively now (with some trial and error, of course), having practiced them a lot. Playing/using color mixers (with red/green/blue sliders for example) helps in understanding relationships. Now, I know that FFFF00 is yellow, FF00FF is magenta, 00FFFF is cyan, plus of course primary colors, and all others colors are in between.

俏︾媚 2024-07-14 22:01:31

您只需记住比例是 00(无色彩效果)到 FF(全彩效果),并且三元组的三个部分是红色、绿色和蓝色。

000000 是黑色(即无颜色),FFFFFF 是白色(混合所有三种原色)。

难点在于记住混合物,我使用以下助记符:

  • 非常好的山药:红+绿=黄(土豆是我最喜欢的食物)。
  • 非常糟糕的李子:红色+蓝色=紫色(我真的很讨厌李子)。
  • 好/坏苹果:绿色+蓝色=水色(我对苹果不感兴趣)。

显然,如果你的食物口味与我的不同,你可能必须想出自己的助记符。 但我发现这对我来说是最简单的方法。

然后只需改变数量即可添加更多的红色或更少的蓝色等等。 我通常只使用 00、40、80、C0 和 FF 值,因为这为您提供了 125 种颜色的调色板可供选择,而且我不希望过多的选择拖慢我的速度。

You just have to remember that the scale is 00 (no color effect) through FF (full color effect) and the three parts of the triplet are red, green and blue.

000000 is black (i.e., no color) and FFFFFF is white (mixing all three primary colors).

The hard bit is remembering the mixtures, which I use the following mnemonics for:

  • Really good yams: Red + Green = Yellow (potatoes are my favorite food).
  • Really bad prunes: Red + Blue = Purple (I really hate prunes).
  • Good/bad apples: Green + Blue = Aqua (I'm indifferent about apples).

Obviously, you may have to come up with your own mnemonics if you food tastes differ from mine. But I find that's the easiest way for me.

Then it's just a matter of varying the quantities to add a little more red or little less blue and so on. I generally only use values of 00, 40, 80, C0 and FF since that gives you a 125-color palette to choose from and I don't want an abundance of choices to slow me down.

白鸥掠海 2024-07-14 22:01:31

您需要在这里了解三个不同的事情。

  1. 读取和写入十六进制数字。 这只需要练习并熟悉它即可。 颜色代码的范围从 00(零)到 FF(= 255),因此请花一点时间(也许在科学模式下使用 calc.exe?)选择一个数字并尝试猜测它的十六进制值,反之亦然。 用十进制计数可能是你的第二天性; 以十六进制计数是相同的概念,具有不同的符号和规则。

  2. 如何将 RGB 颜色代码读取为三个分量值。 RGB 代码可以写为三位数字 (#FFF) 或六位数字 (#FFFFFF)。 在第一种情况下,每个数字都是一个颜色分量; 红色,绿色,然后蓝色。 0 = 空,F =“满”(最大)。 第二个是相同的,但附加的数字为您提供了更广泛的色调,因为每个分量有 256 种可能的强度,而不是 16 个。

  3. 了解 RGB 颜色模型。 你的原色是红色、绿色和蓝色。 您的辅助色是黄色 (R+G)、洋红色 (R+B) 和青色 (G+B)。 增加所有值使颜色变浅; 减少它们会使颜色变暗。 纯灰度将具有三个相等的分量 - 例如#ddd、#222。 通过将其中一个颜色值稍微调高一点来调成灰色 - #866 将为您提供带有一丝红色的深灰色。 这一点你只需要通过经验来学习。 玩它。 获取像 Instant Eyedropper 这样的工具,并用它来查找已知颜色的十六进制值。

让它完全正确是非常非常困难的,但是用不了几天你就可以说“正确......我想要橙色,介于红色(#F00)和黄色(#FF0)之间”在色轮上,所以让我们尝试拆分差异并使用#F90...嗯,有点暗,所以让我们将 G 和 B 分量稍微调高...#FA2...明白了!”

You need to get your head around three distinct things here.

  1. Reading and writing numbers in hexadecimal. This just takes practice and familiarizing yourself with it. Color codes range from 00 (zero) through FF (= 255), so spend a little time (using calc.exe in Scientific mode, maybe?) picking a number and trying to guess what it'll be in hex, and vice versa. Counting in decimal is probably second nature to you; counting in hex is the same concept, with different symbols and rules.

  2. How to read an RGB colour code as three component values. RGB codes are either written as three digits (#FFF) or six (#FFFFFF). In the first case, each digit is a single colour component; red, green, then blue. 0 = empty, F = 'full' (maximum). The second is the same but the additional digit gives you a much wider range of tones because you have 256 possible intensities for each component instead of 16.

  3. Knowing the RGB colour model. Your primary colours are red, green and blue. Your secondary colours are yellow (R+G), magenta (R+B) and cyan (G+B). Increasing all the values makes the colour lighter; decreasing them all makes it darker. Pure greyscales will have three equal components - e.g. #ddd, #222. Tint greys by nudging one of the colour values up a bit - #866 will give you a dark grey with a hint of red. This bit you just have to learn through experience. Play with it. Get a tool like Instant Eyedropper and use it to find the hex values of known colours.

Getting it exactly right is very, very hard, but it won't take more than a couple of days before you can say "right... I want orange, which is somewhere between red (#F00) and yellow (#FF0) on the colour wheel, so let's try splitting the difference and use #F90... hmm, bit dark, so let's nudge the G and B components up a bit... #FA2... got it!"

夏花。依旧 2024-07-14 22:01:31

只要把它想象成混合油漆即可。

共有RR、GG、BB(RRGGBB)三种成分,可混合不同强度。 请记住,00 是最低强度,ff 是最高强度。

例如,我们知道 000000 在所有颜色上都是低强度并且是黑色。 同样,ffffff 在所有三种颜色分量中最高,并且将是白色。

您可以通过使某一部分变强或变弱来添加或删除颜色。 例如,从黑色 000000 开始,添加一点红色 330000,或者添加一点蓝色 000033。将两者都添加,看看会发生什么 330033。

添加大量红色,使用 ff0000。 或者为 006600 添加中等量的绿色。

如果所有三个分量都接近相同的强度,它们会相互抵消,并且您将得到灰度,该灰度将根据颜色的强度而变亮或变暗。 因此 000000、333333、666666、999999 和 ffffff 分别是黑色、深灰色、浅灰色和白色。

如果您采用中灰色,并添加一点蓝色,您最终会得到蓝灰色,例如 888899。红色、绿色和蓝色几乎相等,因此几乎是灰色,但蓝色多一点。 您可以对它们进行一些实验。

查看颜色代码的一个非常好的工具是这个(小且免费):

http://www.nattyware。 com/pixie.html

希望有帮助!

Just think of it as mixing paint.

There are the three components RR, GG, BB, (RRGGBB) which can be mixed with different strengths. Remember that 00 is lowest strength, and ff is highest.

For example, we know that 000000 will be low strength on all colors and will be black. Likewise, ffffff is highest on all three color components, and will be white.

You can add or remove color by making one part stronger or weaker. For example, start with black 000000, and add a little red as 330000, or add a little blue with 000033. Add both and see what happens 330033.

Add a LOT of red, with ff0000. Or add a medium amount of green for 006600.

If all three components are close to the same strength, they cancel each other out and you have grayscale, which will be light or dark depending on the strength of the colors. So 000000, 333333, 666666, 999999, and ffffff are black, dark greys, ligher grays, and white.

If you take a medium gray, and add a little blue, you end up with a bluish grey, like 888899. Red, green, and blue almost equal, so almost grey, but with a bit more blue. You can experiment with them a bit.

One really great tool for viewing color codes is this (small and free):

http://www.nattyware.com/pixie.html

Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文