Skip to content

Cannot make oklch color lighter #4343

Closed

Activity

  1. dosubot commented on May 20, 2025

    @dosubot

    Hello @Jagget! I'm Dosu, your friendly bot here to help you solve bugs, answer questions, and assist you on your journey to becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today?

    The error you're encountering with the oklch function in Less version 4.3.0 seems to be related to the parsing of the function's arguments. Unfortunately, I couldn't find specific documentation or examples for the oklch function in the Less codebase, which might help clarify the correct syntax or usage .

    However, based on typical usage patterns for color manipulation functions in Less, you might want to ensure that the syntax for the oklch function is correct and that the arguments are being passed in a format that Less can interpret. If the function is not parsing correctly, it could be due to an issue with how the calc function is being used within the oklch function.

    You might try simplifying the expression or checking if there are any updates or patches related to the oklch function in the Less repository that address this issue. Additionally, verifying the syntax against any available documentation or examples could be helpful.

    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

  2. puckowski commented on May 20, 2025

    @puckowski
    Contributor

    Thank you for reporting the issue. I'll take a look this weekend, see if I can come up with a PR.

  3. Jagget commented on May 20, 2025

    @Jagget
    Author

    It also doesn't parse multiplication:

        background-color: oklch(from #0000FF calc(l * 0.5) c h);
  4. added a commit that references this issue on May 23, 2025
  5. puckowski commented on May 26, 2025

    @puckowski
    Contributor

    PR #4344 should resolve this issue. Awaiting peer review before it is merged.

  6. puckowski commented on Jul 16, 2025

    @puckowski
    Contributor

    Hello, this issue should be resolved in Less 4.4.0 available on npm now at https://www.npmjs.com/package/less/v/4.4.0

    This Less in part:

    background: oklch(from #0000FF calc(l + 0.1) c h);

    becomes:

    <style type="text/css">.box,
    .bar {
      width: 100px;
      background: oklch(from #0000FF calc(l + 0.1) c h);
      height: 50px;
    }
    @media (min-width: 600px) {
      .bar {
        width: 200px;
        border: 1px solid white;
      }
    }
    </style>
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