Skip to content

Conversation

@robin-gerling
Copy link
Contributor

  • Add support for special colors
  • Add support for predefined gradients
  • Add support for custom gradients with multiple stop values/colors
  • Add possibility to apply model (similar to model nominal)
  • Add color conversion utility
  • Interpolate using lab for new models/use rgb interpolation for color manager

UIEXT-1663 (Web UI for Color Manager - Color Gradient Designer)

Copilot AI review requested due to automatic review settings December 15, 2025 13:39
@robin-gerling robin-gerling requested a review from a team as a code owner December 15, 2025 13:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a Color Gradient Designer feature for the KNIME Color Manager, enabling support for:

  • Multiple stop values/colors with CIELab color space interpolation
  • Predefined color gradients (matplotlib/ColorBrewer palettes)
  • Special color handling for edge cases (NaN, infinity, missing values)
  • Percentage-based and absolute value stop configurations

Key changes:

  • New color space conversion utilities for sRGB/Hex/CIELab transformations
  • Enhanced ColorModelRange to support gradient-based color models
  • Predefined color gradient definitions from matplotlib and ColorBrewer

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ColorSpaceConversionUtil.java Utility class for color space conversions between sRGB, Hex, and CIELab
ColorModelRange.java Extended to support multiple stop values, special colors, and gradient-based interpolation
ColorGradientDefinitionUtil.java Constant definitions for predefined color gradients from matplotlib and ColorBrewer
ColorGradient.java Enum defining available color gradient options
ColorSpaceConversionUtilTest.java Test coverage for color space conversion utilities
ColorModelRangeTest.java Expanded test coverage for new ColorModelRange functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

config.addDoubleArray(CFG_STOP_VALUES, m_stopValues);
config.addStringArray(CFG_STOP_COLORS_HEX, Arrays.stream(m_stopColorsCIELab)
.map(ColorSpaceConversionUtil::convertCIELabColorToHexString).toArray(String[]::new));
} else if (!m_stopValuesArePercentages) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this case even exist? I.e. a non-custom color gradient that is not percentage?
I think it is even not possible to construct such a case given the current constructors since either CUSTOM is used or stopValuesArePercentages is set to true.

So let's remove this if thats the case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes,

  • Percentage Non-Custom: Gradient Designer without input port and cividis
  • Absolute Non Custom: Gradient Designer with input port and cividis (here, the color model gets applied to the common domain)

}
if (gradient != ColorGradient.CUSTOM) {
var colorModel = new ColorModelRange(specialColors, gradient);
if (!stopValuesArePercentages) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: This cannot happen, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

- Add support for special colors
- Add support for predefined gradients
- Add support for custom gradients with multiple stop values/colors
- Add possibility to apply model (similar to model nominal)
- Add color conversion utility
- Interpolate using lab for new models/use rgb interpolation for color manager

UIEXT-1663 (Web UI for Color Manager - Color Gradient Designer)
- constuctor for predefined gradients should not be used for custom gradients
- applied models should not be applied a second time

UIEXT-1663 (Web UI for Color Manager - Color Gradient Designer)
UIEXT-1663 (Web UI for Color Manager - Color Gradient Designer)
Copilot AI review requested due to automatic review settings December 19, 2025 10:42
@robin-gerling robin-gerling force-pushed the enh/UIEXT-1663-web-ui-for-color-manager-color-gradient-designer branch from 08646a9 to de1907a Compare December 19, 2025 10:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

org.knime.core/src/eclipse/org/knime/core/data/property/ColorModelRange2.java:1

  • Corrected spelling of 'testThrowsWhenStopValuesAreNotSortedNonDecreasing'. The word 'Descreasing' should be 'Decreasing'.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants