Is there a quick way to apply an entire color palette to a linear gradient in Inkscape?
I built a custom .gpl file which is available along with the native palettes.
However, I can't see where I can assign an entire palette to a gradient. Is this possible? Without creating individual stops for each palette color? (there are 41 colors in my palette)
I'm running v1.1
Cheers
added 2021-08-02
Here's some python code to output formatted tags (as @Xrott's web tool will do):
# works for a list of rgb tuples with integer values
rgb_tup_lst =[(127, 0, 0), (138, 0, 0), (150, 0, 0)]
stops = [(n/len(rgb_tup_lst)) for n,i in enumerate(rgb_tup_lst)]
stops_rgb_lst = list(zip(stops, rgb_tup_lst))
for s in stops_rgb_lst:
print("<stop offset='{}' stop-color='rgb{}'/>".format(round(s[0],3), s[1]))
Then, can copy and past from your IDE and follow directions from @Xrott's answer...please be sure to still upvote their answer if you find my python code helpful.