Palette to clut to application


(samj) #21

@afre

This command is very slow if you use G’MIC CLI.
The number of colors with the original script is limited to 12, you can adapt it according to your wishes, it is free software.
Here are 2 examples including one with 4 random colors.

gmic -v - -m sylvie_alexandre.gmic 1024,1024,1,3 -samj_Palette_De_Degrades 159,190,195,55,67,140,54,40,39,140,81,88,207,175,190,220,202,196,170,186,192,130,149,139,112,96,96,237,168,138,220,199,205,234,217,219,0,0,512,20 -rm[-1] -o degrade.png


gmic -v - -m sylvie_alexandre.gmic 1024,1024,1,3 -samj_Palette_De_Degrades {(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,{(u)*255}
,207,175,190,220,202,196,170,186,192,130,149,139,112,96,96,237,168,138,220,199,205,234,217,219,0,0,512,20 -rm[-1] -o degrade_4couleurs_aleatoires.png

source : https://github.com/dtschump/gmic-community/raw/master/include/sylvie_alexandre.gmic


(samj) #22

@David_Tschumperle

It’s very, very pretty
:o)


#23

I do gravitate toward simplicity :tiger::mage:, which this is. I wonder if we could make pencils –CLUT→ wall more interesting colour-wise (short of machine learning :wink:).

1 Are commands faster in the plugin?
2 I suppose I could adapt it. Thanks for sharing :slight_smile:.
3 Good idea about randomizing the remaining colours.

Actually, for #2, I meant to pose a broader question. Maybe @David_Tschumperle could respond to this. I have been thinking whether it would be possible to make the plugin filters more adaptable. E.g., in @samj’s -samj_Palette_De_Degrades, would it be possible for the user to choose the number of colours, and then *poof* the UI only has x number of colour selection menus. I see many filters that would benefit from this modular format.


(David Tschumperlé) #24

Then, this wouldn’t be a CLUT anymore. It would probably mean that two pixels with exactly the same color in the source image may be assigned with two different colors of the reference image.

No reason for that.

Having such dynamic GUI would mean having a more complex language for describing GUI (which is quite basic in its current state), with probably conditions, loops, and everything that makes a real language, not just a simple description with a static list of items.
Meaning also, a lot of new things to learn and to implement.


#25

You are right. The insomnia or sun is getting to me. :sunny: Still, it would be a good idea to explore the ability to transfer colours in a way where a colourful reference could make a dull target just, or at least half, as colourful. There are probably some papers on that subject.

I joked about the machine learning but it is what the cool kids are using nowadays and, if I recall correctly, there were musings on the possibility. :stuck_out_tongue: