RGB to HEX: #DA70D6

Also known as: CSS orchid

Result

rgb(218 112 214) → #DA70D6

Values are shown at full precision, so converting back gives exactly #da70d6. The rounded form is what you normally paste into CSS.

Step-by-step math

Every number below is computed from the input, nothing is looked up.

  1. 1. base 10 → base 16

    R = 218 = 13×16 + 10 → DA
    G = 112 = 7×16 + 0 → 70
    B = 214 = 13×16 + 6 → D6
  2. 2. pairs → HEX

    DA 70 D6 → #DA70D6

All formats

HEX
#da70d6
RGB
rgb(218 112 214)
RGB (legacy)
rgb(218, 112, 214)
HSL
hsl(302.26 58.89% 64.71%) → hsl(302 59% 65%)
HWB
hwb(302 44% 15%)
OKLCH
oklch(0.702 0.181 328.7) · oklch(70.2% 0.181 328.7)
OKLab
oklab(0.702 0.155 -0.094)
Lab (D50)
lab(62.75 52.45 -34.10)
LCH (D50)
lch(62.75 62.57 326.97)
Display P3
color(display-p3 0.8009 0.4613 0.8187)
Linear sRGB
color(srgb-linear 0.7011 0.1620 0.6724)

Gamut: sRGB and Display P3

#DA70D6 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.319 and Display P3 reaches 0.352; this color uses 57% of the sRGB chroma available.

CSS snippets

.element {
  color: #da70d6;
  color: rgb(218 112 214);
  color: hsl(302 59% 65%);
  color: oklch(0.702 0.181 328.7);
}

/* Tailwind CSS v4 */
@theme {
  --color-brand: oklch(0.702 0.181 328.7);
}
/* arbitrary values */
class="text-[#da70d6] bg-[oklch(0.702_0.181_328.7)]"

/* wide-gamut screens */
@media (color-gamut: p3) {
  .element { color: color(display-p3 0.8009 0.4613 0.8187); }
}

/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #da70d6 calc(l - 0.1) c h); }

Nearby colors

Closest colors in the Tailwind and CSS named palettes (OKLab distance).

Lighter and darker, same hue and chroma

  • #EE83EA · oklch(0.762 0.181 328.7) · ΔL +0.06
  • #C65DC2 · oklch(0.642 0.181 328.7) · ΔL −0.06

Open in the studio

Other converters for this color

All converters →

Guides: What is OKLCH?