How to create gradient with any angle and stop locations? #453
Answered
by
facelessuser
test3211234
asked this question in
Q&A
-
|
In Oklab. I want to generate a PIL image with any width, height, number of stops and stop locations, and direction vector for the angle. Basically Photoshop gradients. I need it to be very very very very very very fast, so I gave up on writing my own since I have no experience in color. Is this possible? If not with this library, can you recommend me as to how to go about this? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
facelessuser
Jan 28, 2025
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
facelessuser
-
|
Moving to discussions |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

I don't fully understand what you are asking to be honest, but I'll answer generally as best I can.
We don't directly interact with PIL, nor do most color libraries, they normally focus on the color portion, not the image portion, that is what PIL is for. You have to write that code.
Sure, you can interpolate with any number of stops and stop locations. I don't know if all libraries make this easy for the user, but ColorAide does.
I assume you are talking about the direction of the gradient in the image? If so, …