4 or 8 digit hex color codes are not recognized
See original GitHub issueDescription
Hexadecimal color codes using exactly 4 digits/places are not recognized in Sublime Text Buffers. E.g.:
#0000
which would mean “complete transparency”.
Those 4 digit codes are valid color codes in CSS.
Support Info
I am using Sublime Text v3.1.1 build 3176 with ColorHelper v2.5.1
- ST ver.: 3176
- Platform: linux
- Arch: x64
- Plugin ver.: 2.5.1
- Install via PC: True
- mdpopups ver.: 3.3.4
- markdown ver.: 2.6.11
- pygments ver.: 2.1a0
- jinja2 ver.: 2.8
Steps to Reproduce Issue
- Open a source file with color codes inside. The codes with 3 or 6 digits should get recognized.
- Type in a color code with exactly 4 digits. E.g.:
#F00F
(should equal to pure red). - See that the plugin does not recognize the correctly written color code and does not draw a color box.
This issue is kinda related to #26, but this is the reverse: Detecting compressed codes.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Did you know there are 4 and 8 digit hex codes (#11223344 ...
10 years as a developer and somehow I have missed that there are 4 digit (#1234) and 8 digit (#11223344) hex codes for...
Read more >8-digit hex is not a background-color value - css - Stack Overflow
I'd have to double-check the spec, but use 3 byte codes, instead. The 4th byte is used for the alpha (transparency) channel and...
Read more >CSS 8 Digit Hex Colors - Quackit Tutorials
The CSS 8-digit hex color notation allows you to specify RGB colors using hexadecimal values, while at the same time, specifying its transparency....
Read more >How to Read Hex Color Codes - Hexadecimal Color | Pluralsight
Then add the two totals together to equal 255. Recognize that the number 255 is the same as the RGB number 255, which...
Read more >How to apply a color of #FF6D9700(8 DIGIT) hex code to a css ...
hexcode should always 6 digit code so this 8 digit code is not valid color, I am suggesting use color picker and convert...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
CSS3 made sense at the time. All the colors were not supported fully in browsers at the time as I recall.
When I have time, if it isn’t already present, I’ll try to make the
color_scanning
behavior more clear.That is a CSS4 color convention. You’d have to enable CSS4 colors: http://facelessuser.github.io/ColorHelper/usage/#color_scanningallowed_colors.