Skip to content

Add custom Opsin Inverse Matrix (XYB Color Bias tuning)#4813

Draft
Galaxy4594 wants to merge 10 commits into
libjxl:mainfrom
Galaxy4594:custom-color-matrix
Draft

Add custom Opsin Inverse Matrix (XYB Color Bias tuning)#4813
Galaxy4594 wants to merge 10 commits into
libjxl:mainfrom
Galaxy4594:custom-color-matrix

Conversation

@Galaxy4594

@Galaxy4594 Galaxy4594 commented May 30, 2026

Copy link
Copy Markdown
Contributor

New API additions allowing the user to manually tune the RGB -> LMS color pipeline.

JXL_ENC_FRAME_SETTING_COLOR_BOOST: A boolean toggle that applies a scaling yellow_bias based on quantization.
JXL_ENC_FRAME_SETTING_RED_BIAS: Float value to tune the L-cone multiplier.
JXL_ENC_FRAME_SETTING_GREEN_BIAS: Float value to tune the M-cone multiplier.
JXL_ENC_FRAME_SETTING_YELLOW_BIAS: Float value to tune the S-cone multiplier.

New CLI Flags has been added to cjxl to accompany these new API features:

--color_boost: Applies yellow_bias which fixes the yellow desaturation issues present. The strength increases with quantization.
--red_bias <float>, --green_bias <float>, --yellow_bias <float>: Manually tune individual cone responses.

This code is AI-assisted and I didn't have time to comb through the slop yet.

Fixes: #3616 and possibly other color related issues.

@Galaxy4594 Galaxy4594 force-pushed the custom-color-matrix branch from 6e49dd0 to 665add9 Compare June 4, 2026 10:25
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.

Excessive desaturation of vibrant colors

1 participant