{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "158cd1cf-6b30-4054-b32f-a166fcb883be",
   "metadata": {
    "tags": [
     "hide"
    ]
   },
   "outputs": [],
   "source": [
    "import seaborn as sns\n",
    "sns.set_theme()\n",
    "sns.palettes._patch_colormap_display()"
   ]
  },
  {
   "cell_type": "raw",
   "id": "c81b86cb-fb4e-418b-8d2f-6cd10601ac5a",
   "metadata": {},
   "source": [
    "By default, return 6 colors with identical lightness and saturation and evenly-sampled hues:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6c3eaeaf-88eb-4012-96ea-41b328fa98b9",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.hls_palette()"
   ]
  },
  {
   "cell_type": "raw",
   "id": "f7624b0b-2311-45de-b6a5-fc07132ce455",
   "metadata": {},
   "source": [
    "Increase the number of colors:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "555c29d1-6972-4a19-ad32-957fb7545634",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.hls_palette(8)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "24713fa6-e485-4358-9ffc-d40bd9543caa",
   "metadata": {},
   "source": [
    "Decrease the lightness:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b6f80b4c-f7b4-4deb-a119-cdf6cfe1f7b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.hls_palette(l=.3)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "e521b514-5572-43e8-95ae-a20cc30169b8",
   "metadata": {},
   "source": [
    "Decrease the saturation:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f88bd038-0c9c-48b1-92b0-d272a9c199f4",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.hls_palette(s=.3)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "92a2212c-2177-4c82-8a5e-9dd788e9f87c",
   "metadata": {},
   "source": [
    "Change the start-point for hue sampling:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f8da8fbc-551c-4896-b1b8-04203e740d78",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.hls_palette(h=.5)"
   ]
  },
  {
   "cell_type": "raw",
   "id": "87780608-1f5a-409f-b31f-6a31a599f122",
   "metadata": {},
   "source": [
    "Return a continuous colormap. Notice the perceptual discontinuities, especially around yellow, cyan, and magenta: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4c622b3b-70d7-4139-8389-f3d0d4addd66",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.hls_palette(as_cmap=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3a83c1de-88c5-4327-abd2-19e8f3642052",
   "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
}
