Background color

Syntax

Class
Properties
bg-c-{...color}
background-color: {...};

Parameters

...color
<...color>
<div class="t1 w-96 h-96 rounded-full shadow-4 bg-c-blue"></div>

Specification test cases

The test cases below are imported from the Turbo CSS specification. They have been executed upon loading this page.
Background color by name.
t1 bg-c-blue
.t1.bg-c-blue { background-color: #12A4E2; }
Unknown color name.
t1 bg-c-unknownname
Error: unknown color definition [unknownname] in class name [bg-c-unknownname]
Background color by name and shade.
t1 bg-c-blue-500
.t1.bg-c-blue-500 { background-color: #12A4E2; }
Background color by name, shade, opacity.
t1 bg-c-blue-500-50
.t1.bg-c-blue-500-50 { background-color: #12A4E280; }
Background color by HEX color value in lowercase format.
t1 bg-c-hex-abcdef
.t1.bg-c-hex-abcdef { background-color: #ABCDEF; }
Background color by HEX color value in uppercase format.
t1 bg-c-hex-ABCDEF
.t1.bg-c-hex-ABCDEF { background-color: #ABCDEF; }
Background color by HEX color value with alpha channel.
t1 bg-c-hex-12345678
.t1.bg-c-hex-12345678 { background-color: #12345678; }
Background color by rgb color value.
t1 bg-c-rgb-12-34-56
.t1.bg-c-rgb-12-34-56 { background-color: rgb(12, 34, 56); }
Background color by rgba color value.
t1 bg-c-rgb-12-34-56-78
.t1.bg-c-rgb-12-34-56-78 { background-color: rgba(12, 34, 56, 78%); }
Background color by hsl color value.
t1 bg-c-hsl-60-20-40
.t1.bg-c-hsl-60-20-40 { background-color: hsl(60deg, 20%, 40%); }
Background color by hsla color value.
t1 bg-c-hsl-60-20-40-66
.t1.bg-c-hsl-60-20-40-66 { background-color: hsla(60deg, 20%, 40%, 66%); }