关于CSS颜色代码的简单问题 [英] Simple question regarding CSS color code

查看:170
本文介绍了关于CSS颜色代码的简单问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CSS颜色代码为RR GG BB。那么#26c 如何与蓝色阴影相关?

CSS color codes are RR GG BB. So how does #26c relate to a shade of blue?

编辑 br>
感谢所有人的帮助 - 我会标记看起来最努力的人的答案。


Wow thanks for everyones help - I'll mark the answer of the one who appears to have put most effort in

推荐答案

#26c 是一个Websafe十六进制颜色代码。十六进制颜色通常为6个字符长,例如黑色是#000000 ,白色是 #ffffff 。 Websafe颜色只有三个字符长双倍,因此#26c 变成#2266cc

#26c is a Websafe hexadecimal colorcode. Hexadecimal colors are usually 6 characters long, for example black is #000000 and white is #ffffff. Websafe colors are only three characters long that double up, so #26c becomes #2266cc.

这与蓝色阴影有关的原因是因为计算十六进制代码的方式。 22表示颜色从1到255的红色量,66表示代码中的绿色量,CC表示蓝色点。

The reason why this relates to a shade of blue is because of the way Hexadecimal codes are calculated. 22 represents the amount of RED in the color from 1 to 255, 66 represents the amount of green in the code and CC represents the points of blue.

但是CC如何代表金额?

But how can CC represent an amount?

我很高兴你问,计算机喜欢计算EIGHT数字的金额,所以开发了一个基于16的幂的数字系统,所以你不开始直到你得到16,但从11 - 15你使用字母。因此10是A,11是B,12是C,13是D 14是E,15是F.

Well I'm glad you asked, computers like to count in amounts of EIGHT digits and so have developed a number system based on powers of 16, so you don't start over til you get to 16, but from 11 - 15 you use letters. So 10 is A, 11 is B, 12 is C, 13 is D 14 is E and 15 is F.

+ 12x16),意味着204点的蓝色的颜色。这是最高的值,将意味着颜色大多是蓝色:)

So when calculated using Hexadecimal, CC becomes 204 (12+12x16), meaning 204 points of blue in the color. this being the highest value, will mean the color is mostly blue :)

#000000 表示0红,0绿色和0蓝色,这就是为什么它是黑色的,完全没有颜色。 #ffffff 表示255红,255绿和255蓝,这就是为什么它是白色,所有的颜色加在一起使白色。和之间的所有颜色可以这样计算:)

#000000 means 0 red, 0 green and 0 blue, that's why it is black, totally devoid of color. #ffffff means 255 red, 255 green and 255 blue, that's why it is white, all the colors added together makes white. And all the colors in between can be calculated this way :)

希望有帮助。 :)

这篇关于关于CSS颜色代码的简单问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆