adobe / adobe/leonardo

Diverging palette does not handle darker middle colors

Open
#253 0 comments 0 reactions 0 assignees View on GitHub
bug UI
Dominant language
JavaScript
Stars
2.1k
Forks
130
PR merge metrics
No merged PRs in 30d

Description

## Description

When using a middle color that is darker than the start/end colors, the gradient result is not smooth.

## Steps to reproduce

1. Enter start colors that are light, such as 5BBDDA and E47DFB.
2. Enter middle color that is darker, such as 2C2EDC.

## Expected behavior

A smooth gradient/palette without wild kinks in the model should be generated.

## Screenshots

![Image](https://github.com/user-attachments/assets/1273c4b1-c3eb-4464-a8cb-e47dc8515c9a)

## Environment

- Firefox 138.3 on iPadOS

## Additional context

This functionality is crucial for dark mode diverging palettes.

This seems to be purely an issue of lightness, not disjointed hue combinations.

Contributor guide

Open the contributing guide

Research direction

The issue names no source file, test, or entry point. Start by reproducing the palette with light start/end colors and the darker middle color from the report, then trace the palette-generation path responsible for lightness interpolation. Done means the resulting diverging palette is smooth without wild kinks, including for dark-mode colors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.