-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE]: Add colourspace XYB from JPEG-XL #1118
Comments
Hi @zeroby0, Thank you, great idea! This seems to follow the typical IPT-like colour model structure, which we generalise:
Cheers, Thomas |
Awesome! Once I figure out how to do that, I'll add the procedure here and close the issue. Thank you for the links! |
This seems to be kind of obscure and not documented well, but this tweet seems to indicate the default format of the color space subtracts Y from B to make X = B = 0 for achromatic colors: https://twitter.com/jonsneyers/status/1605321352143331328 You can achieve this by just adjusting the matrix: [
[0.5, -0.5, 0.0],
[0.5, 0.5, 0.0],
[0.0, -1.0, 1.0],
] This gives the color space a more practical Lab-like orientation where Y operates as your lightness and X and B change the hue and contrast. I guess there are a lot of people implementing it without this adjustment. Anyways, hope this helps. |
Description
Hi!
Please add support for colour space XYB. There is two variants of XYB, one defined in Google/Butteraugli and the other in JPEG-XL (and PIK)
Here is numpy code to convert to and fro from XYZ and Jpeg-XL's XYB. I'll create a pull request after 20th March if no one has done so by then :)
Credits to Raph Levien for the original code in JS which I ported to Python/Numpy.
The text was updated successfully, but these errors were encountered: