{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8f97280e-cec8-42b2-a968-4fd4364594f8",
   "metadata": {
    "tags": [
     "hide"
    ]
   },
   "outputs": [],
   "source": [
    "import seaborn as sns\n",
    "sns.set_theme()\n",
    "sns.palettes._patch_colormap_display()"
   ]
  },
  {
   "cell_type": "raw",
   "id": "972edede-df1a-4010-9674-00b864d020e2",
   "metadata": {},
   "source": [
    "Pass a list of two colors to interpolate between them:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e6ae2547-1042-4ac0-84ea-6f37a0229871",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.blend_palette([\"b\", \"r\"])"
   ]
  },
  {
   "cell_type": "raw",
   "id": "1d983eac-2dd5-4746-b27f-4dfa19b5e091",
   "metadata": {},
   "source": [
    "The color list can be arbitrarily long, and any color format can be used:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "846b78fd-30ce-4507-93f4-4274122c1987",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.blend_palette([\"#45a872\", \".8\", \"xkcd:golden\"])"
   ]
  },
  {
   "cell_type": "raw",
   "id": "318fef32-1f83-44d9-9ff9-21fa0231b7c6",
   "metadata": {},
   "source": [
    "Return a continuous colormap instead of a discrete palette:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f0a05bc3-c60b-47a1-b276-d2e28a4a8226",
   "metadata": {},
   "outputs": [],
   "source": [
    "sns.blend_palette([\"#bdc\", \"#7b9\", \"#47a\"], as_cmap=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0473a402-0ec2-4877-81d2-ed6c57aefc77",
   "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
}
