Skip to main content
Version: 1.0

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-slate-50{ backgroundColor: "rgba(248, 250, 252, 1)" }
bg-slate-100{ backgroundColor: "rgba(241, 245, 249, 1)" }
bg-slate-200{ backgroundColor: "rgba(226, 232, 240, 1)" }
bg-slate-300{ backgroundColor: "rgba(203, 213, 225, 1)" }
bg-slate-400{ backgroundColor: "rgba(148, 163, 184, 1)" }
bg-slate-500{ backgroundColor: "rgba(100, 116, 139, 1)" }
bg-slate-600{ backgroundColor: "rgba(71, 85, 105, 1)" }
bg-slate-700{ backgroundColor: "rgba(51, 65, 85, 1)" }
bg-slate-800{ backgroundColor: "rgba(30, 41, 59, 1)" }
bg-slate-900{ backgroundColor: "rgba(15, 23, 42, 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-zinc-50{ backgroundColor: "rgba(250, 250, 250, 1)" }
bg-zinc-100{ backgroundColor: "rgba(244, 244, 245, 1)" }
bg-zinc-200{ backgroundColor: "rgba(228, 228, 231, 1)" }
bg-zinc-300{ backgroundColor: "rgba(212, 212, 216, 1)" }
bg-zinc-400{ backgroundColor: "rgba(161, 161, 170, 1)" }
bg-zinc-500{ backgroundColor: "rgba(113, 113, 122, 1)" }
bg-zinc-600{ backgroundColor: "rgba(82, 82, 91, 1)" }
bg-zinc-700{ backgroundColor: "rgba(63, 63, 70, 1)" }
bg-zinc-800{ backgroundColor: "rgba(39, 39, 42, 1)" }
bg-zinc-900{ backgroundColor: "rgba(24, 24, 27, 1)" }
bg-neutral-50{ backgroundColor: "rgba(250, 250, 250, 1)" }
bg-neutral-100{ backgroundColor: "rgba(245, 245, 245, 1)" }
bg-neutral-200{ backgroundColor: "rgba(229, 229, 229, 1)" }
bg-neutral-300{ backgroundColor: "rgba(212, 212, 212, 1)" }
bg-neutral-400{ backgroundColor: "rgba(163, 163, 163, 1)" }
bg-neutral-500{ backgroundColor: "rgba(115, 115, 115, 1)" }
bg-neutral-600{ backgroundColor: "rgba(82, 82, 82, 1)" }
bg-neutral-700{ backgroundColor: "rgba(64, 64, 64, 1)" }
bg-neutral-800{ backgroundColor: "rgba(38, 38, 38, 1)" }
bg-neutral-900{ backgroundColor: "rgba(23, 23, 23, 1)" }
bg-stone-50{ backgroundColor: "rgba(250, 250, 249, 1)" }
bg-stone-100{ backgroundColor: "rgba(245, 245, 244, 1)" }
bg-stone-200{ backgroundColor: "rgba(231, 229, 228, 1)" }
bg-stone-300{ backgroundColor: "rgba(214, 211, 209, 1)" }
bg-stone-400{ backgroundColor: "rgba(168, 162, 158, 1)" }
bg-stone-500{ backgroundColor: "rgba(120, 113, 108, 1)" }
bg-stone-600{ backgroundColor: "rgba(87, 83, 78, 1)" }
bg-stone-700{ backgroundColor: "rgba(68, 64, 60, 1)" }
bg-stone-800{ backgroundColor: "rgba(41, 37, 36, 1)" }
bg-stone-900{ backgroundColor: "rgba(28, 25, 23, 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-orange-50{ backgroundColor: "rgba(255, 247, 237, 1)" }
bg-orange-100{ backgroundColor: "rgba(255, 237, 213, 1)" }
bg-orange-200{ backgroundColor: "rgba(254, 215, 170, 1)" }
bg-orange-300{ backgroundColor: "rgba(253, 186, 116, 1)" }
bg-orange-400{ backgroundColor: "rgba(251, 146, 60, 1)" }
bg-orange-500{ backgroundColor: "rgba(249, 115, 22, 1)" }
bg-orange-600{ backgroundColor: "rgba(234, 88, 12, 1)" }
bg-orange-700{ backgroundColor: "rgba(194, 65, 12, 1)" }
bg-orange-800{ backgroundColor: "rgba(154, 52, 18, 1)" }
bg-orange-900{ backgroundColor: "rgba(124, 45, 18, 1)" }
bg-amber-50{ backgroundColor: "rgba(255, 251, 235, 1)" }
bg-amber-100{ backgroundColor: "rgba(254, 243, 199, 1)" }
bg-amber-200{ backgroundColor: "rgba(253, 230, 138, 1)" }
bg-amber-300{ backgroundColor: "rgba(252, 211, 77, 1)" }
bg-amber-400{ backgroundColor: "rgba(251, 191, 36, 1)" }
bg-amber-500{ backgroundColor: "rgba(245, 158, 11, 1)" }
bg-amber-600{ backgroundColor: "rgba(217, 119, 6, 1)" }
bg-amber-700{ backgroundColor: "rgba(180, 83, 9, 1)" }
bg-amber-800{ backgroundColor: "rgba(146, 64, 14, 1)" }
bg-amber-900{ backgroundColor: "rgba(120, 53, 15, 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-lime-50{ backgroundColor: "rgba(247, 254, 231, 1)" }
bg-lime-100{ backgroundColor: "rgba(236, 252, 203, 1)" }
bg-lime-200{ backgroundColor: "rgba(217, 249, 157, 1)" }
bg-lime-300{ backgroundColor: "rgba(190, 242, 100, 1)" }
bg-lime-400{ backgroundColor: "rgba(163, 230, 53, 1)" }
bg-lime-500{ backgroundColor: "rgba(132, 204, 22, 1)" }
bg-lime-600{ backgroundColor: "rgba(101, 163, 13, 1)" }
bg-lime-700{ backgroundColor: "rgba(77, 124, 15, 1)" }
bg-lime-800{ backgroundColor: "rgba(63, 98, 18, 1)" }
bg-lime-900{ backgroundColor: "rgba(54, 83, 20, 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-emerald-50{ backgroundColor: "rgba(236, 253, 245, 1)" }
bg-emerald-100{ backgroundColor: "rgba(209, 250, 229, 1)" }
bg-emerald-200{ backgroundColor: "rgba(167, 243, 208, 1)" }
bg-emerald-300{ backgroundColor: "rgba(110, 231, 183, 1)" }
bg-emerald-400{ backgroundColor: "rgba(52, 211, 153, 1)" }
bg-emerald-500{ backgroundColor: "rgba(16, 185, 129, 1)" }
bg-emerald-600{ backgroundColor: "rgba(5, 150, 105, 1)" }
bg-emerald-700{ backgroundColor: "rgba(4, 120, 87, 1)" }
bg-emerald-800{ backgroundColor: "rgba(6, 95, 70, 1)" }
bg-emerald-900{ backgroundColor: "rgba(6, 78, 59, 1)" }
bg-teal-50{ backgroundColor: "rgba(240, 253, 250, 1)" }
bg-teal-100{ backgroundColor: "rgba(204, 251, 241, 1)" }
bg-teal-200{ backgroundColor: "rgba(153, 246, 228, 1)" }
bg-teal-300{ backgroundColor: "rgba(94, 234, 212, 1)" }
bg-teal-400{ backgroundColor: "rgba(45, 212, 191, 1)" }
bg-teal-500{ backgroundColor: "rgba(20, 184, 166, 1)" }
bg-teal-600{ backgroundColor: "rgba(13, 148, 136, 1)" }
bg-teal-700{ backgroundColor: "rgba(15, 118, 110, 1)" }
bg-teal-800{ backgroundColor: "rgba(17, 94, 89, 1)" }
bg-teal-900{ backgroundColor: "rgba(19, 78, 74, 1)" }
bg-cyan-50{ backgroundColor: "rgba(236, 254, 255, 1)" }
bg-cyan-100{ backgroundColor: "rgba(207, 250, 254, 1)" }
bg-cyan-200{ backgroundColor: "rgba(165, 243, 252, 1)" }
bg-cyan-300{ backgroundColor: "rgba(103, 232, 249, 1)" }
bg-cyan-400{ backgroundColor: "rgba(34, 211, 238, 1)" }
bg-cyan-500{ backgroundColor: "rgba(6, 182, 212, 1)" }
bg-cyan-600{ backgroundColor: "rgba(8, 145, 178, 1)" }
bg-cyan-700{ backgroundColor: "rgba(14, 116, 144, 1)" }
bg-cyan-800{ backgroundColor: "rgba(21, 94, 117, 1)" }
bg-cyan-900{ backgroundColor: "rgba(22, 78, 99, 1)" }
bg-sky-50{ backgroundColor: "rgba(240, 249, 255, 1)" }
bg-sky-100{ backgroundColor: "rgba(224, 242, 254, 1)" }
bg-sky-200{ backgroundColor: "rgba(186, 230, 253, 1)" }
bg-sky-300{ backgroundColor: "rgba(125, 211, 252, 1)" }
bg-sky-400{ backgroundColor: "rgba(56, 189, 248, 1)" }
bg-sky-500{ backgroundColor: "rgba(14, 165, 233, 1)" }
bg-sky-600{ backgroundColor: "rgba(2, 132, 199, 1)" }
bg-sky-700{ backgroundColor: "rgba(3, 105, 161, 1)" }
bg-sky-800{ backgroundColor: "rgba(7, 89, 133, 1)" }
bg-sky-900{ backgroundColor: "rgba(12, 74, 110, 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-violet-50{ backgroundColor: "rgba(245, 243, 255, 1)" }
bg-violet-100{ backgroundColor: "rgba(237, 233, 254, 1)" }
bg-violet-200{ backgroundColor: "rgba(221, 214, 254, 1)" }
bg-violet-300{ backgroundColor: "rgba(196, 181, 253, 1)" }
bg-violet-400{ backgroundColor: "rgba(167, 139, 250, 1)" }
bg-violet-500{ backgroundColor: "rgba(139, 92, 246, 1)" }
bg-violet-600{ backgroundColor: "rgba(124, 58, 237, 1)" }
bg-violet-700{ backgroundColor: "rgba(109, 40, 217, 1)" }
bg-violet-800{ backgroundColor: "rgba(91, 33, 182, 1)" }
bg-violet-900{ backgroundColor: "rgba(76, 29, 149, 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-fuchsia-50{ backgroundColor: "rgba(253, 244, 255, 1)" }
bg-fuchsia-100{ backgroundColor: "rgba(250, 232, 255, 1)" }
bg-fuchsia-200{ backgroundColor: "rgba(245, 208, 254, 1)" }
bg-fuchsia-300{ backgroundColor: "rgba(240, 171, 252, 1)" }
bg-fuchsia-400{ backgroundColor: "rgba(232, 121, 249, 1)" }
bg-fuchsia-500{ backgroundColor: "rgba(217, 70, 239, 1)" }
bg-fuchsia-600{ backgroundColor: "rgba(192, 38, 211, 1)" }
bg-fuchsia-700{ backgroundColor: "rgba(162, 28, 175, 1)" }
bg-fuchsia-800{ backgroundColor: "rgba(134, 25, 143, 1)" }
bg-fuchsia-900{ backgroundColor: "rgba(112, 26, 117, 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)" }
bg-rose-50{ backgroundColor: "rgba(255, 241, 242, 1)" }
bg-rose-100{ backgroundColor: "rgba(255, 228, 230, 1)" }
bg-rose-200{ backgroundColor: "rgba(254, 205, 211, 1)" }
bg-rose-300{ backgroundColor: "rgba(253, 164, 175, 1)" }
bg-rose-400{ backgroundColor: "rgba(251, 113, 133, 1)" }
bg-rose-500{ backgroundColor: "rgba(244, 63, 94, 1)" }
bg-rose-600{ backgroundColor: "rgba(225, 29, 72, 1)" }
bg-rose-700{ backgroundColor: "rgba(190, 18, 60, 1)" }
bg-rose-800{ backgroundColor: "rgba(159, 18, 57, 1)" }
bg-rose-900{ backgroundColor: "rgba(136, 19, 55, 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

Custom Background Color

You can add your own background color by adding color configration in osmi.config.js

export default {
colors: {
"primary-500": "#A8B3D6",
},
};

Then, you can use that color with syntax apply("bg-primary-500")