The background-color: color \0; hack

Last updated 2016-01-28.

The hack

.your-selector-here {
  background-color: somecolor \0;
}

…where somecolor is a CSS color value.

Source: Browser CSS Hacks by Paul Irish

Important note! This article only applies to the background-color property and only applies when there is space between somecolor and \0. Adding spaces or using different properties may change the compatibility of the hack.
You have been warned.

Live testcases

Color keyword

If the rectangle above is light green, then your browser supports this hack for color keyword values (e.g. lime).

Hex color

If the rectangle above is light green, then your browser supports this hack for RGB colors in hexadecimal notation (e.g. #adff2f).

Affected

If the rectangle above shows the word "Affected" on a green background, then your browser supports this hack for the transparent keyword color value.

rgb(R,G,B)

If the rectangle above is light green, then your browser supports this hack for RGB colors in functional notation (e.g. rgb(173, 255, 47)).

How it works

Affected browsers

Check out the links for corroborating screenshots.

Test results
Chrome
OS X Safari
iOS Safari
Firefox
Microsoft Edge
Internet Explorer
Chrome OS X
Safari
iOS
Safari
Firefox MS Edge1 Internet
Explorer
49
Unknown
10
Unknown
9.3
Unknown
45
Unknown
13
Unknown
48
Unknown
9.0.3
Unknown
9.2
Unknown
44.0
Unknown
12.10240
Unaffected
11
Unaffected
47
Unknown
8.0.8
Unknown
8.4
Unknown
43.0.1
Unknown
12.10166
Unknown
10
Unaffected
26
Unaffected
7.1.7
Unaffected
7.1
Unaffected
4.0.1
Unaffected
9
Unaffected
25
Unknown
6.2.7
Unknown
6.1
Unknown
8
Unaffected
7
Unknown
Note 1: MS Edge versions refer to the EdgeHTML rendering engine version, not the Edge app version shown in Edge's "About" screen. See this Can I Use issue.