Scale per-key V component by global V component rather than ignoring per-key V component#492
Open
CalcProgrammer1 wants to merge 1 commit into
Open
Conversation
…per-key V component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The per-key RGB (actually HSV) implementation currently completely ignores the per-key V component, meaning that every key must be the same brightness (V). This means you cannot have any keys darker or lighter than others, only different hues and saturations. This is not ideal for driving the keyboard's per-key RGB from external effects software such as OpenRGB or SignalRGB, which often generate effect patterns with varying brightness and expect the keyboard's LEDs to follow these colors accurately.
In this PR, I have updated the per-key RGB modes to scale the per-key V component by the global V component. If the per-key V component is kept at 255 (full brightness) for each key, there is no functional change. However, this now allows keys to have lower brightnesses than others, and they will scale accordingly.
Tested on Keychron Q2. I can still adjust the brightness for the per-key modes using Fn+W/S but keys that are dimmer than full bright scale accordingly now.
Fixes #480
Video of OpenRGB Effects Plugin with an effect that varies per-key brightness:
https://www.youtube.com/watch?v=vb103j4zNA8