Turn down Saturation/Value of the Highlighted layers in detail-view

i want to desaturate partially some layers in one detail-view so that they feel less important. is there any way/script to highlight some layers and simultaneously decrease/increase their saturation/value without affecting hue.

hi @Kalpit_3d yes this is possible, see if this python sample helps:

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino.DocObjects.Tables
import Rhino.Display

layernames = rs.GetLayers()
for name in layernames:

    layer = sc.doc.Layers.Find(name, True)
    color = sc.doc.Layers[layer].Color
    hsv = Rhino.Display.ColorHSV.CreateFromRGBA(color)
    hsv.S =hsv.S/2
    sc.doc.Layers[layer].Color = hsv

yes it do works. can we combine it with brightness control as well. i mean the script should have four options like (1). decrease saturation by 10% (2) increase by 10% (3) decrease brightness by 10% (4) Increase brightness by 10%. better if instead of selecting layers from running script but the the script read the already selected layers so users can select layers by other methods as well.

user input can be done with, for example, rhinoscriptsyntax’s GetInteger function
https://developer.rhino3d.com/api/RhinoScriptSyntax/#userinterface-GetInteger