Replies: 1 comment
-
Hi @eitanlees, This one is an oddity and I have been wondering if we should not get rid of it: There are two references for it:
We use the second one as it provides an inverse but there are some fixes / changes compared to 1. in the forward model. If you use some RGB values, you will see that hue is in range [-1/3 PI, PI] and Lightness in range ~[0, 135/255]: P = [
[0, 0, 0],
[1, 0, 0],
[0, 1, 0],
[0, 0, 1],
[1, 1, 0],
[0, 1, 1],
[1, 0, 1],
[1, 1, 1],
]
colour.convert(P, "RGB", "HCL") array([[ 0. , 0. , 0. ],
[ 0. , 0.66666667, 0.5 ],
[ 2.0943951 , 0.66666667, 0.5 ],
[ 0. , 0.66666667, 0.5 ],
[ 0. , 0.66666667, 0.5 ],
[ 3.14159265, 0.66666667, 0.5 ],
[-1.04719755, 0.66666667, 0.5 ],
[ 0. , 0. , 0.53045453]]) As for the reason the domain / range is given as being [0, 1], it is something we should maybe update here but it is worth being aware of this: https://colour.readthedocs.io/en/develop/basics.html#domain-range-scales, i.e. they are soft domain / ranges. Playing quickly with the model and comparing the two references, one notable change is the computation of |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am new to colour and learning about different colorspaces. I am a little confused and wanted to ask a few beginner questions.
I was trying to vary different parameters of a color space between [0, 1] and create a visualization of the corresponding output.
This worked well for RGB, HSV, and HSL but did not work for HCL. I am not sure what is going on. Reading the documentation for the
HCL_to_RGB
mentions a domain and range of [0,1] for both color spaces, so I was confused by this behavior.Also in the example they are using a number outside of this range. I am not sure I understand what is the correct range of values the HCL color space expects.
I am interested in creating a visualization similar to this one I've found online
(source)
Any advice on how to create such a plot is appreciated 🙂
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions