Skip to content

Unsupported CSS4 Color Values when using color() #4576

Backlog

Description

@adi-

lessc returns RuntimeError: Error evaluating function 'color': keyword.toLowerCase is not a function in... when trying to use ither than sRGB color space like color: color(display-p3 1 1 1);

Activity

  1. dosubot commented on Nov 25, 2026

    @dosubot

    Hi @adi-! I'm Dosu and I'm helping the Personal team.

    To pass the CSS color() call through to the browser, escape the whole value with ~"…". Less emits the contents without the quotes [1].

    color: ~"color(display-p3 1 1 1)";

    The error is a naming collision, not a Display P3 limitation specifically. Less treats color() as its built-in color helper and sends the space-separated arguments to a keyword lookup that expects a string and calls .toLowerCase() on it [2] [3].

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about less.js with Dosu Add Dosu to your team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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