Hexadecimal XML Text Conventions

Usually, colors in hexadecimal notation are represented by a hashtag of 6 hexadecimal characters. What color produces the #AAA value? Are other characters derived from existing ones? Are missing values ​​assumed?

+4
source share
3 answers

Good question.

Short answer: #xyz reads as #xxyyzz, so a concrete example means that #aaa becomes #aaaaaa, a gray rather dark tone (68.75%).

Wikipedia calls this short hexadecimal form, https://en.wikipedia.org/wiki/Web_colors#Shorthand_hexadecimal_form

CSS , . , CSS, , . jsfiddle : http://jsfiddle.net/mYdb5/ :

Color test:<br/>
<div/>

div {
    background-color: #aaa;
    width:100%;
    height:40px;
}
+2

#AAA #AAAAAA

3- , , char ( ) (, #ABC #AABBCC)

+4

Source: https://habr.com/ru/post/1545049/


All Articles