Skip to content

additive spectral mixing for tertiary colors (2/3D preview displays and ColortoolFull toolbox) - #2176

Open
edogawa23 wants to merge 4 commits into
mcallegari:masterfrom
edogawa23:colortool
Open

edogawa23 wants to merge 4 commits into
mcallegari:masterfrom
edogawa23:colortool

Conversation

@edogawa23

@edogawa23 edogawa23 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Summary of Changes:
Use additive spectral mixing for W,A and UV in ColorToolFull resulting color box as well as in 2/3D preview

Look at the color box below the W,A and UV channel sliders in ColorToolFull tab. Current code blends from the RGB value obtained trom the gradient area towards the chosen slider's color, when raised.
This change implements spectral additive mixing and thus matches the real fixture's resulting color much better in the preview's RGB color space.

I've been working on this from time to time since my latest PR in this area, a few weeks ago, with help from Devin AI in Windsurf. It took a lot of trial and error to arrive at this state which I believe has it right now.

There are remaining issues with the scaling of the RGB gradient box in relation to what the mouse cursor grabs as color, I haven't found yet why that happens, from my tests it apparently has nothing to do with hidpi scaling as it remains offsetting at a KDE Plasma screen scaling of 1.00 and also QLC UI scaling at 1.00. I'll continue working on that, as time permits.

Checklist

  • [x ] I have read and followed the QLC+ Coding Guidelines.
  • [ x] My code adheres to the project's coding style, including:
    • [x ] Placing opening braces { on a new line for functions and class definitions.
    • [x ] Consistent use of spaces and indentation.
  • [ x] I have tested my changes on the following platforms:
    • [ x] Linux
    • Windows
    • macOS
  • I have added or updated documentation as necessary.

Testing

Test Cases:

Test Results:

Additional Notes

Current behaviour (example with added Amber on top of a pure Cyan):
WAUV blending - current master
With additive blending, Also Amber example:
WAUV additive blending


Thank you for your contribution to QLC+!

edogawa23 and others added 4 commits September 29, 2026 09:27
Adds a visual crosshair marker that shows the current RGB position
on the color gradient canvas. The crosshair consists of:
- Horizontal line showing lightness position
- Vertical line showing hue position
- Center circle marker

The crosshair updates automatically when the RGB color changes
and follows mouse interaction on the gradient canvas.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Changes from upstream's linear blending to additive mixing for W, A, UV:
- White: brightens all RGB channels equally (1.0, 1.0, 1.0)
- Amber: adds R=1.0, G=0.49, B=0.0 (using upstream's 0xFFFF7E00)
- UV: adds R=0.58, G=0.0, B=0.83 (using upstream's 0xFF9400D3)

This creates additive mixing where emitters brighten while adding
their tint, rather than fading to the pure emitter color.

QML changes:
- Add mixedColor property with additive mixing logic
- Update WAUV sliders to update both local values and fixture output
- Use mixedColor in selected color preview via MultiColorBox primary

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(moved to separate feature branch)
This reverts commit 2d943b0ba13f27ba1b35227a00363e21f0f7976b.
Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@edogawa23

edogawa23 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Oops I forgot to mention, the crosshair commit lives in another branch now and got thus reverted here - I'll file a separate PR for that.
Also, "tertiary colors" in the commit title is probably wrong - I also experimented with adding a third RGB triple to add support for e.g. Lime, Indigo, Mint emitters, but decided to postpone or stop on that when you stated in the forums that the engine just can't handle that (or something to that effect).

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 35.321%. remained the same — edogawa23:colortool into mcallegari:master

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants