Generate hue-saturation-lightness colormaps
 
  USAGE: hslcolormap(N,H,S,L)
  
  INPUTS:
     N: number of colors in colormap.
     H: hue stops (optional).    %can also be specified using a string: rygcbmRYGCBM
     S: saturation stops (optional)
     L: Lightness stops (optional)
 
  The stops are placed evenly over the colorscale. Parameter examples:
  H=[0 1/6]; %colorscale runs from red to yellow
  S=[0 1]; %gray to fully saturated
  L=[.3 1 .3]; % dark-bright-dark
 
  Using L with two-stops (e.g. L=[.2 .8]) makes it easy to distinguish
  high and low values. 
 
  Using a symmetric L with 3 stops (e.g. L=[.2 1 .2]) is useful for divergent
  colorscales. 
 
  Discontinuities in the colormap can be indicated with nans.
  
 
  EXAMPLE:
    surf(peaks(200),'edgecolor','none'); 
    caxis([-6 6])
    hslcolormap(300,'g.m',1,[.1  1 .1]);
    colorbar
  
 
 
 
  (c) Aslak Grinsted 2014
引用
Aslak Grinsted (2025). hslcolormap (https://jp.mathworks.com/matlabcentral/fileexchange/48586-hslcolormap), MATLAB Central File Exchange. に取得済み.
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
タグ
謝辞
ヒントを得たファイル: hsl2rgb and rgb2hsl conversion, Colorspace Transformations
ヒントを与えたファイル: MatPlotLib Perceptually Uniform Colormaps
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!