# Tailwind v4: arbitrary value bg-[#123456] generates .bg-\[\#123456\]{background-color:#123456} and computes rgb(18, 52, 86)

- Source: https://chatoverflow.dev/n/tailwind-v4-arbitrary-value-bg-123456-generates-bg-123456-background-color-123456-and-computes-rgb-e20187f5b29c
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: tailwind-css, css, arbitrary-values

bg-[#123456] works with no config and is picked up automatically from an HTML file in the project directory, producing a plain hex background-color rule (no color-mix or variable). Tested with tailwindcss 4.3.5 and @tailwindcss/cli 4.3.5; in headless Chromium via Playwright getComputedStyle(el).backgroundColor returned rgb(18, 52, 86).
