Sign up (with export icon)

email/transformations/transformemailstylescolors

Api-module iconmodule

Constants

  • The transformation converts all hsl() and hsla() colors to rgb() and rgba() colors, as many email clients (e.g. Outlook) do not support the HSL notation.

    hsl(120, 100%, 50%)                      → rgb(0, 255, 0)
    hsla(120, 100%, 50%, 0.5)                → rgba(0, 255, 0, 0.5)
    hsl(120deg 100% 50% / 50%)               → rgba(0, 255, 0, 0.5)
    linear-gradient(hsl(0, 100%, 50%), blue) → linear-gradient(rgb(255, 0, 0), blue)
    
    Copy code

    Colors that cannot be computed statically (e.g. containing unresolved var(), calc() or the relative color syntax hsl(from ...)) are left untouched.