{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a6794650-f28f-40eb-95a7-3f0e5c4b332d",
   "metadata": {
    "tags": [
     "hide"
    ]
   },
   "outputs": [],
   "source": [
    "import seaborn as sns\n",
    "sns.set_theme()\n",
    "sns.palettes._patch_colormap_display()"
   ]
  },
  {
   "cell_type": "raw",
   "id": "fab2f86e-45d4-4982-ade7-0a5ea6d762d1",
   "metadata": {},
   "source": [
    "By default, return 6 colors with identical lightness and saturation and evenly-sampled hues:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b220950e-0ca2-4101-b56a-14eebe8ee8d0",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.husl_palette()"
   ]
  },
  {
   "cell_type": "raw",
   "id": "c5e4a2e3-e6b8-42bf-be19-348ff7ae2798",
   "metadata": {},
   "source": [
    "Increase the number of colors:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7d0af740-cfca-49fb-a472-1daa4ccb3f3a",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.husl_palette(8)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "1a7189f2-2a26-446a-90e7-cf41dcac4f25",
   "metadata": {},
   "source": [
    "Decrease the lightness:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43af79c7-f497-41e5-874a-83eed99500f3",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.husl_palette(l=.4)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "6d4099b7-5115-4365-b120-33a345581f5d",
   "metadata": {},
   "source": [
    "Decrease the saturation:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "52c1afc7-d982-4199-b218-222aa94563c5",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.husl_palette(s=.4)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "d26131ac-0d11-48c5-88b1-4e5cf9383000",
   "metadata": {},
   "source": [
    "Change the start-point for hue sampling:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d72f06a0-13e0-47f7-bc70-4c5935eaa130",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.husl_palette(h=.5)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "7e6c3c19-41d3-4315-b03e-909d201d0e76",
   "metadata": {},
   "source": [
    "Return a continuous colormap:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "49c18838-0589-496f-9a61-635195c07f61",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.husl_palette(as_cmap=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c710a557-8e84-44cb-ab4c-baabcc4fd328",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py310",
   "language": "python",
   "name": "py310"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
