Skip to content

hsl/hsla colors not caught by compatibility checker #2947

@tlow92

Description

@tlow92

Describe the Bug

No hsl color is supported in microsoft outlook, but react-email renders them correctly everywhere else.
react-email also does not show a compatibility warning, so it's very hard to notice if you do not use outlook yourself.
Example colors: "hsl(198, 65%, 45%)" or "hsla(240, 100%, 50%, 0.75)"

Link to the code that reproduces this issue

https://github.com/tlow92/react-email-hsl-colors

Direct link to specific change to the starter template:
tlow92/react-email-hsl-colors@bf954a8

To Reproduce

  1. Use following backgroundColor on any element "hsl(198, 65%, 45%)"
  2. Check in preview server -> Rendered correctly
  3. Use "Send" feature to send it to any email that can be accessed with Microsoft Outlook
  4. Background color is missing

Rendered in preview server:

Image

Rendered in Microsoft Outlook

Image

Expected Behavior

I would expect either one of the following

  1. Automatic conversion from hsl/hsla to a compatible color like rgb
  2. Show compatibility warning

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions