Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How are 4 and 5 digit hex color codes represented? [closed]

Tags:

html

css

colors

When I use #FF22 or #FF444, what rules turn it into a color? I know that hex codes should be 6 digits, or 3, but this works in chrome.

like image 320
Tom Avatar asked Apr 24 '14 20:04

Tom


1 Answers

There is no 4 digit hex color. 3 digit hex color is converted into 6 digit hex color by copying each character next to each to other. For example, #f0f is expanded to #ff00ff.

like image 176
Bura Chuhadar Avatar answered Oct 02 '22 16:10

Bura Chuhadar