11const
22 inEle = op . inObject ( "Element" , null , "element" ) ,
33 inType = op . inSwitch ( "Type" , [ "linear" , "radial" , "conic" ] , "linear" ) ,
4-
54 inRCS = op . inDropDown ( "Rect Color Space" , [ "srgb" , "srgb-linear" ,
6- "hsl" , "hwb" , "lch" ,
7- "display-p3" , "a98-rgb" , "prophoto-rgb" , "rec2020" , "lab" , "oklab" , " yz", "xyz-d50" , "yz-d65"
5+ "hsl" , "hwb" , "lch" , "lab" , "oklab" ,
6+ "display-p3" , "a98-rgb" , "prophoto-rgb" , "rec2020" , "yz" , "xyz-d50" , "yz-d65"
87 ] , "srgb" ) ,
98 // inHue = op.inDropDown("Hue interpolation", ["shorter", "longer", "increasing", "decreasing"], "shorter"),
109 inAngle = op . inFloat ( "Angle" , 0 ) ,
@@ -51,7 +50,9 @@ function update()
5150
5251 for ( let i = 0 ; i < keys . length ; i ++ )
5352 {
54- let p = keys [ i ] . pos * 100 ;
53+ let p = keys [ i ] . pos * 100 + "% " ;
54+ // if(inType.get()=="conic")p=(keys[i].pos * 360)+"deg";
55+
5556 str += "rgb(" ;
5657 str += Math . round ( keys [ i ] . r * 255 ) ;
5758 str += "," ;
@@ -60,7 +61,7 @@ function update()
6061 str += Math . round ( keys [ i ] . b * 255 ) ;
6162 str += "," ;
6263 str += keys [ i ] . a ;
63- str += ") " + p + "% " ;
64+ str += ") " + p ;
6465
6566 if ( i < keys . length - 1 ) str += ",\n" ;
6667 }
0 commit comments