Can I select/deselect/adjust colour channel of fluorescence via QuPath script

Hi all, I am currently using QuPath for my analysis but I have a problem with building a script to automate my analysis.
First, I have fluorescent images that have 5 different color channels (cy7, cy5, cy3, etc).
I want to build a script to turn off some color channels and adjust the remaining channel.
For now I can view image color channel name or RGB code of each channel using the below script.

for (int c = 0; c < server_2.nChannels(); c++) {
    def channelName = server_2.getChannel(c.intValue())
    // channelName is instance of

For the next step, I want to compute the new min/max display and adjust the ranges with the new ranges. I found the support display function from but clearly have know idea of how to use them in the script as of AbstractChannelInfo .
Can anyone give me some idea to complete my task.

Best Regards

I generally use variants of the scripts from here to set my channels, though I think Pete has told me multiple times that getting the channels from the server is the better way to do it now. I just forget how to actually set the min and max when doing it that way and keep forgetting to save the script.

This continues to work for me though.
I did find this:
“I don’t remember where I wrote about it. I just remember replying to you about it aghast a couple of times.”
I never learn…