Skip to main content
Version: 0.6

Background Color

Background Color

Utilities for controlling an element's background color.

NamespaceOutputPreview
bg-transparent{ backgroundColor: "transparent" }
bg-black{ backgroundColor: "rgba(0, 0, 0, 1)" }
bg-white{ backgroundColor: "rgba(255, 255, 255, 1)" }
bg-gray-50{ backgroundColor: "rgba(249, 250, 251, 1)" }
bg-gray-100{ backgroundColor: "rgba(243, 244, 246, 1)" }
bg-gray-200{ backgroundColor: "rgba(229, 231, 235, 1)" }
bg-gray-300{ backgroundColor: "rgba(209, 213, 219, 1)" }
bg-gray-400{ backgroundColor: "rgba(156, 163, 175, 1)" }
bg-gray-500{ backgroundColor: "rgba(107, 114, 128, 1)" }
bg-gray-600{ backgroundColor: "rgba(75, 85, 99, 1)" }
bg-gray-700{ backgroundColor: "rgba(55, 65, 81, 1)" }
bg-gray-800{ backgroundColor: "rgba(31, 41, 55, 1)" }
bg-gray-900{ backgroundColor: "rgba(17, 24, 39, 1)" }
bg-red-50{ backgroundColor: "rgba(254, 242, 242, 1)" }
bg-red-100{ backgroundColor: "rgba(254, 226, 226, 1)" }
bg-red-200{ backgroundColor: "rgba(254, 202, 202, 1)" }
bg-red-300{ backgroundColor: "rgba(252, 165, 165, 1)" }
bg-red-400{ backgroundColor: "rgba(248, 113, 113, 1)" }
bg-red-500{ backgroundColor: "rgba(239, 68, 68, 1)" }
bg-red-600{ backgroundColor: "rgba(220, 38, 38, 1)" }
bg-red-700{ backgroundColor: "rgba(185, 28, 28, 1)" }
bg-red-800{ backgroundColor: "rgba(153, 27, 27, 1)" }
bg-red-900{ backgroundColor: "rgba(127, 29, 29, 1)" }
bg-yellow-50{ backgroundColor: "rgba(255, 251, 235, 1)" }
bg-yellow-100{ backgroundColor: "rgba(254, 243, 199, 1)" }
bg-yellow-200{ backgroundColor: "rgba(253, 230, 138, 1)" }
bg-yellow-300{ backgroundColor: "rgba(252, 211, 77, 1){{ }} }
bg-yellow-400{ backgroundColor: "rgba(251, 191, 36, 1)" }
bg-yellow-500{ backgroundColor: "rgba(245, 158, 11, 1)" }
bg-yellow-600{ backgroundColor: "rgba(217, 119, 6, 1)" }
bg-yellow-700{ backgroundColor: "rgba(180, 83, 9, 1)" }
bg-yellow-800{ backgroundColor: "rgba(146, 64, 14, 1)" }
bg-yellow-900{ backgroundColor: "rgba(120, 53, 15, 1)" }
bg-green-50{ backgroundColor: "rgba(236, 253, 245, 1)" }
bg-green-100{ backgroundColor: "rgba(209, 250, 229, 1)" }
bg-green-200{ backgroundColor: "rgba(167, 243, 208, 1)" }
bg-green-300{ backgroundColor: "rgba(110, 231, 183, 1)" }
bg-green-400{ backgroundColor: "rgba(52, 211, 153, 1)" }
bg-green-500{ backgroundColor: "rgba(16, 185, 129, 1)" }
bg-green-600{ backgroundColor: "rgba(5, 150, 105, 1)" }
bg-green-700{ backgroundColor: "rgba(4, 120, 87, 1)" }
bg-green-800{ backgroundColor: "rgba(6, 95, 70, 1)" }
bg-green-900{ backgroundColor: "rgba(6, 78, 59, 1)" }
bg-blue-50{ backgroundColor: "rgba(239, 246, 255, 1)" }
bg-blue-100{ backgroundColor: "rgba(219, 234, 254, 1)" }
bg-blue-200{ backgroundColor: "rgba(191, 219, 254, 1)" }
bg-blue-300{ backgroundColor: "rgba(147, 197, 253, 1)" }
bg-blue-400{ backgroundColor: "rgba(96, 165, 250, 1)" }
bg-blue-500{ backgroundColor: "rgba(59, 130, 246, 1)" }
bg-blue-600{ backgroundColor: "rgba(37, 99, 235, 1)" }
bg-blue-700{ backgroundColor: "rgba(29, 78, 216, 1)" }
bg-blue-800{ backgroundColor: "rgba(30, 64, 175, 1)" }
bg-blue-900{ backgroundColor: "rgba(30, 58, 138, 1)" }
bg-indigo-50{ backgroundColor: "rgba(238, 242, 255, 1)" }
bg-indigo-100{ backgroundColor: "rgba(224, 231, 255, 1)" }
bg-indigo-200{ backgroundColor: "rgba(199, 210, 254, 1)" }
bg-indigo-300{ backgroundColor: "rgba(165, 180, 252, 1)" }
bg-indigo-400{ backgroundColor: "rgba(129, 140, 248, 1)" }
bg-indigo-500{ backgroundColor: "rgba(99, 102, 241, 1)" }
bg-indigo-600{ backgroundColor: "rgba(79, 70, 229, 1)" }
bg-indigo-700{ backgroundColor: "rgba(67, 56, 202, 1)" }
bg-indigo-800{ backgroundColor: "rgba(55, 48, 163, 1)" }
bg-indigo-900{ backgroundColor: "rgba(49, 46, 129, 1)" }
bg-purple-50{ backgroundColor: "rgba(245, 243, 255, 1)" }
bg-purple-100{ backgroundColor: "rgba(237, 233, 254, 1)" }
bg-purple-200{ backgroundColor: "rgba(221, 214, 254, 1)" }
bg-purple-300{ backgroundColor: "rgba(196, 181, 253, 1)" }
bg-purple-400{ backgroundColor: "rgba(167, 139, 250, 1)" }
bg-purple-500{ backgroundColor: "rgba(139, 92, 246, 1)" }
bg-purple-600{ backgroundColor: "rgba(124, 58, 237, 1)" }
bg-purple-700{ backgroundColor: "rgba(109, 40, 217, 1)" }
bg-purple-800{ backgroundColor: "rgba(91, 33, 182, 1)" }
bg-purple-900{ backgroundColor: "rgba(76, 29, 149, 1)" }
bg-pink-50{ backgroundColor: "rgba(253, 242, 248, 1)" }
bg-pink-100{ backgroundColor: "rgba(252, 231, 243, 1)" }
bg-pink-200{ backgroundColor: "rgba(251, 207, 232, 1)" }
bg-pink-300{ backgroundColor: "rgba(249, 168, 212, 1)" }
bg-pink-400{ backgroundColor: "rgba(244, 114, 182, 1)" }
bg-pink-500{ backgroundColor: "rgba(236, 72, 153, 1)" }
bg-pink-600{ backgroundColor: "rgba(219, 39, 119, 1)" }
bg-pink-700{ backgroundColor: "rgba(190, 24, 93, 1)" }
bg-pink-800{ backgroundColor: "rgba(157, 23, 77, 1)" }
bg-pink-900{ backgroundColor: "rgba(131, 24, 67, 1)" }

Background Opacity

Control the opacity of an element’s background color using the bg-opacity-{amount} utilities. Example:

SyntaxOutput
bg-purple-700 bg-opacity-100
bg-purple-700 bg-opacity-75
bg-purple-700 bg-opacity-70
bg-purple-700 bg-opacity-25