Unable to convert colors? #411
Copy link
Copy link
Closed
Labels
S: triageIssue needs triage.Issue needs triage.
Description
BTW, Coloraide is not for the faint of heart.
I managed to get to this point:
rom coloraide import cat
from coloraide import Color
lab_D65 = Color("lab", [30, 26, -27], illuminant="D65")
xyz_d65 = lab_D65.convert("xyz-d65").coords()
xyz_d50 = Color.chromatic_adaptation(cat.WHITES['2deg']["D50"], cat.WHITES['2deg']["D65"], xyz_d65, method='bradford')
But I can't figure how to convert xyz_d50 to Lab_d50?
Lab_d50 = xyz_d50 ???
Metadata
Metadata
Assignees
Labels
S: triageIssue needs triage.Issue needs triage.
Activity
facelessuser commentedon Mar 30, 2024
I think you are greatly overthinking things. ColorAide generally tries to dumb things down a lot for the average user.
ColorAide exposes
xyz-d65andxyz-d50.labuses D50,lab-d65uses D65 illuminant. If I could go back, I'd probably use the IDlab-d50forlabeven if it serializes tolabfor CSS.Yes, you can subclass the existing XYZ spaces and add more XYZ space with different illuminates, but we added the ones that average user would need to use.
facelessuser commentedon Mar 30, 2024
If it helps, each supported color space has their name mentioned in their
propertiesdescription in the documentation: https://facelessuser.github.io/coloraide/colors/xyz_d50/#xyz-d50.facelessuser commentedon Mar 30, 2024
I will also state that most people will not need to use
chromatic_adaptationdirectly. It's there, and we use it internally during conversions and such, but the hope is that the average user will not need to touch it. If you are doing advanced stuff, there are times when that may be handy. I don't expect everything that ColorAide exposes to be used by the majority of people, but some of it has to exist so we can provide the easy stuff, like a simple.convert().Our goal isn't to necessarily be a colour science library, which is a great library, but to appeal to people that just want to use colors.
It is possible that maybe sometimes I delve a little too deep into topics in the documentation 😅. There's a lot to know about colors, so I think it is interesting to help people understand some of it, but the average user is going to just be converting, filtering, mixing, etc. We wanted to make that fairly easy to do.
facelessuser commentedon Mar 30, 2024
Lastly, the documentation covers color object generally (how to create colors, convert colors, clone colors, etc.) https://facelessuser.github.io/coloraide/color/#converting.
The documentation also covers color manipulation: https://facelessuser.github.io/coloraide/manipulation/.