@@ -271,6 +271,7 @@ def setup_gamut_options(self):
271271
272272 self .show_out_of_gamut_preview = ch_settings .get ('show_out_of_gamut_preview' , True )
273273 self .gamut_space = ch_settings .get ('gamut_space' , 'srgb' )
274+ self .gamut_map = ch_settings .get ('gamut_map' , 'lch-chroma' )
274275 if self .gamut_space not in util .GAMUT_SPACES :
275276 self .gamut_space = 'srgb'
276277 self .out_of_gamut = self .base ("transparent" ).convert (self .gamut_space )
@@ -423,7 +424,7 @@ def do_search(self, force=False):
423424 mdpopups .scope2style (self .view , self .view .scope_name (pt ))['background' ]
424425 ).convert ("hsl" )
425426 hsl ['lightness' ] = hsl ['lightness' ] + (0.3 if hsl .luminance () < 0.5 else - 0.3 )
426- preview_border = hsl .convert (self .gamut_space , fit = True ).set ('alpha' , 1 )
427+ preview_border = hsl .convert (self .gamut_space , fit = self . gamut_map ).set ('alpha' , 1 )
427428
428429 color = self .base (obj .color )
429430 title = ''
@@ -434,15 +435,15 @@ def do_search(self, force=False):
434435 if not color .in_gamut (check_space ):
435436 title = ' title="Preview out of gamut"'
436437 if self .show_out_of_gamut_preview :
437- pcolor = color .convert (self .gamut_space , fit = True )
438+ pcolor = color .convert (self .gamut_space , fit = self . gamut_map )
438439 preview1 = pcolor .clone ().set ('alpha' , 1 )
439440 preview2 = pcolor
440441 else :
441442 preview1 = self .out_of_gamut
442443 preview2 = self .out_of_gamut
443444 preview_border = self .out_of_gamut_border
444445 else :
445- pcolor = color .convert (self .gamut_space , fit = True )
446+ pcolor = color .convert (self .gamut_space , fit = self . gamut_map )
446447 preview1 = pcolor .clone ().set ('alpha' , 1 )
447448 preview2 = pcolor
448449
0 commit comments