@@ -108,7 +108,8 @@ def plot_slice(
108108 gamut = 'srgb' ,
109109 gmap = None ,
110110 res = 500 ,
111- scatter_size = 16
111+ scatter_size = 16 ,
112+ pspace = None
112113):
113114 """Plot a slice."""
114115
@@ -120,7 +121,8 @@ def plot_slice(
120121 hue , chroma , lightness = cs .names ()
121122 else :
122123 lightness , chroma , hue = cs .names ()
123- pspace = cs .NAME
124+ if pspace is None :
125+ pspace = cs .NAME
124126
125127 # Interpolate between each x axis color along the y axis
126128 cmap = []
@@ -163,6 +165,7 @@ def main():
163165 parser .add_argument ('--max-chroma' , '-M' , help = "Maximum chroma." )
164166 parser .add_argument ('--harmony' , '-n' , default = '' , help = "Color harmony to use." )
165167 parser .add_argument ('--gamut' , '-g' , default = "srgb" , help = 'Gamut to evaluate the color in (default is sRGB).' )
168+ parser .add_argument ('--pspace' , '-p' , help = "Specific perceptual space to gamut map in." )
166169 parser .add_argument ('--map-colors' , '-m' , action = 'store_true' , help = "Gamut map colors to be within the gamut." )
167170 parser .add_argument ('--gamut-map-method' , '-f' , default = "raytrace" , help = "Gamut mapping space." )
168171 parser .add_argument ('--title' , '-t' , default = '' , help = "Provide a title for the diagram." )
@@ -224,7 +227,8 @@ def main():
224227 gamut = args .gamut ,
225228 gmap = gmap ,
226229 res = args .resolution ,
227- scatter_size = int (args .scatter_size )
230+ scatter_size = int (args .scatter_size ),
231+ pspace = args .pspace if args .pspace else None
228232 )
229233
230234 if args .harmony :
0 commit comments