Limiting darkness of a color in a gradient

I have included a section of a cloud/sky photo that is mid-way in processing. I plan to increase the levels overall, which will cause the right side to go black, or nearly so. What is the most efficient way to limit how dark the right side gets? The steps I have considered would not preserve a smooth gradient appearance.

@okieman Just an idea: how about using Graduate filter and/or the curves in Lab* Adjustments (all in Raw Therapee)?

Depends on what software you are using.

You need some sort of mask. In darktable I would be using either a parametric mask based on the L channel - a Luminosity mask (depending on what the rest of the image looked like), or a parametric mask based on “h” (hue) and use the color picker to see where that right side blue was in the mask slider to isolate it. Or maybe a combination of both, using the “show mask” option to adjust those two sliders until the mask looked just right.

Since right side is already a bit darker, I will try to use luminosity masks in GIMP to select lighter part and apply levels.

I’m using GIMP for most post process. I hadn’t yet thought of luminosity masks because I didn’t know if they could give me a smooth gradient. I will start testing your ideas tonight.