def hue_pal(h=<NUM_LIT>, l=<NUM_LIT>, s=<NUM_LIT>, color_space='<STR_LIT>'):
if not all([<NUM_LIT:0> <= val <= <NUM_LIT:1> for val in (h, l, s)]):<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>".format(h, l, s))<EOL>raise ValueError(msg)<EOL><DEDENT>if color_space not in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise ValueError(msg)<EOL><DEDENT>name = '<STR_LIT>'.format(color_space)<EOL>palette = globals()[name]<EOL>def _hue_pal(n):<EOL><INDENT>colors = palette(n, h=h, l=l, s=s)<EOL>return [mcolors.rgb2hex(c) for c in colors]<EOL><DEDENT>return _hue_pal<EOL>
Utility for making hue palettes for color schemes.

Parameters
----------
h : float
    first hue. In the [0, 1] range
l : float
    lightness. In the [0, 1] range
s : float
    saturation. In the [0, 1] range
color_space : 'hls' | 'husl'
    Color space to use for the palette

Returns
-------
out : function
    A discrete color palette that takes a single
    :class:`int` parameter ``n`` and returns ``n``
    equally spaced colors. Though the palette
    is continuous, since it is varies the hue it
    is good for categorical data. However if ``n``
    is large enough the colors show continuity.

Examples
--------
>>> hue_pal()(5)
['#db5f57', '#b9db57', '#57db94', '#5784db', '#c957db']
>>> hue_pal(color_space='husl')(5)
['#e0697e', '#9b9054', '#569d79', '#5b98ab', '#b675d7']