🌐
Seaborn
seaborn.pydata.org › generated › seaborn.color_palette.html
seaborn.color_palette — seaborn 0.13.2 documentation
Reassign color codes like "b", "g", etc. to colors from one of the seaborn palettes.
🌐
Seaborn
seaborn.pydata.org › tutorial › color_palettes.html
Choosing color palettes — seaborn 0.13.2 documentation
The return value is an object that wraps a list of RGB tuples with a few useful methods, such as conversion to hex codes and a rich HTML representation. Calling color_palette() with no arguments will return the current default color palette that matplotlib (and most seaborn functions) will use if colors are not otherwise specified.
🌐
Biomooc
biomooc.com › color › seabornColors.html
seaborn colors - Biomooc
import seaborn as sns #sns.xkcd_rgb['pale red'] plt.plot([1,2], lw=4, c=sns.xkcd_rgb['baby poop green']) black(#000000)desert(#ccad60)yellowy green(#bff128)pine green(#0a481e)dull blue(#49759c)violet pink(#fb5ffc) white(#ffffff)bronze(#a87900)green yellow(#c9ff27)tea(#65ab7c)steel(#738595)purpley ...
🌐
Codecademy
codecademy.com › article › seaborn-color-palettes-complete-guide-to-data-visualization-colors
Seaborn Color Palettes: Complete Guide to Data Visualization Colors | Codecademy
These seaborn color palettes provide consistent styling across your Python data visualizations. You can also customize your palette by passing a list of colors in any valid Matplotlib format. This includes RGB tuples, hex color codes, or HTML color names, giving you full control over the visual ...
🌐
Kaggle
kaggle.com › code › analystoleksandra › colour-palettes-of-seaborn
Colour palettes of seaborn
October 22, 2023 - Explore and run AI code with Kaggle Notebooks | Using data from House Prices - Advanced Regression Techniques
🌐
DataCamp
datacamp.com › tutorial › seaborn-palettes
Seaborn Color Palette: Quick Guide to Picking Colors | DataCamp
September 30, 2024 - Hue represents the pure color, such as red or blue; saturation indicates the intensity of the color, from vivid to muted; and value, also known as brightness, defines the lightness or darkness of the color. Understanding these elements helps in choosing effective colors for visualizing different types of data. ... This Python Seaborn cheat sheet with code samples guides you through the data visualization library that is based on Matplotlib.
🌐
DataCamp
campus.datacamp.com › courses › intermediate-data-visualization-with-seaborn › customizing-seaborn-plots
Colors in Seaborn | Python
Since Seaborn is built on top of matplotlib, it is able to interpret and apply matplotlib color codes. By using the familiar sns.set() function with color codes equals True, any matplotlib color codes will be appropriately mapped to the Seaborn palette.
🌐
GitHub
github.com › mwaskom › seaborn › blob › master › seaborn › palettes.py
seaborn/seaborn/palettes.py at master · mwaskom/seaborn
"cubehelix_palette", "set_color_codes"] · · SEABORN_PALETTES = dict( deep=["#4C72B0", "#DD8452", "#55A868", "#C44E52", "#8172B3", "#937860", "#DA8BC3", "#8C8C8C", "#CCB974", "#64B5CD"], deep6=["#4C72B0", "#55A868", "#C44E52", ...
🌐
Noga H. Rotman
r02b.github.io › seaborn_palettes
Seaborn Color Palettes and How to Use Them | Noga H. Rotman
November 8, 2022 - The matlab default palette we all know and love is called tab10, and is also the default palette for most seaborn functions. The seaborn variations are: deep, muted, pastel, bright, dark, and colorblind, while the matplotlib palettes are tab20, ...
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com › seaborn › seaborn_set_color_codes_method.htm
Seaborn.set_color_codes() method
In this case, we will set the color code to dark and then plot a graph using the matplotlib pyplot method and set the colors to green and purple. The variable to be passed to the color parameter for this is g for green and m for purple. import seaborn as sns import matplotlib.pyplot as plt tips=sns.load_dataset("tips") tips.head() sns.set_color_codes("dark") _ = plt.plot([0, 1.6], color="g") _ = plt.plot([1.4, 0], color="m") plt.show()
Top answer
1 of 1
12

Use custom function

As commented you may create a function that if called with a custom colorname returns the hex color from the list.

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Wanted palette details
enmax_palette = ["#808282", "#C2CD23", "#918BC3"]
color_codes_wanted = ['grey', 'green', 'purple']

c = lambda x: enmax_palette[color_codes_wanted.index(x)]

x=np.random.randn(100)
g = sns.distplot(x, color=c("green"))

plt.show()

Use the C{n} notation.

It should be noted that all colors in seaborn are matplotlib colors. One option matplotlib provides is the so called C{n} notation (with n = 0..9). By specifying a string like "C1" you tell matplotlib to use the second color from the current color cycle. sns.set_palette sets the color cycle to your custom colors. So if you can remember their order in the cycle you can use this information and just specify "C1" for the second color.

import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Wanted palette details
enmax_palette = ["#808282", "#C2CD23", "#918BC3"]

sns.set_palette(palette=enmax_palette)

x=np.random.randn(100)
g = sns.distplot(x, color="C1")

plt.show()

Manipulate the matplotlib color dictionary.

All named colors are stored in a dictionary you can access via

matplotlib.colors.get_named_colors_mapping()

You may update this dictionary with your custom names and colors. Note that this will overwrite existing colors with the same name.

import numpy as np
import matplotlib.pyplot as plt
from matplotlib import colors as mcolors
import seaborn as sns

# Wanted palette details
enmax_palette = ["#808282", "#C2CD23", "#918BC3"]
color_codes_wanted = ['grey', 'green', 'purple']
cdict = dict(zip(color_codes_wanted, [mcolors.to_rgba(c) for c in enmax_palette]))

mcolors.get_named_colors_mapping().update(cdict)
x=np.random.randn(100)
g = sns.distplot(x, color="green")

plt.show()

All codes shown here will produce the same plot in "the company's green" color:

🌐
GeeksforGeeks
geeksforgeeks.org › seaborn-color-palette
Seaborn - Color Palette - GeeksforGeeks
Seaborn is a library mostly used for statistical plotting in Python. It is built on top of Matplotlib and provides beautiful default styles and color palettes to make statistical plots more attractive.In this tutorial, we will learn about Python Seaborn from basics to advance using a huge dataset of
Published: April 8, 2025
🌐
Python Graph Gallery
python-graph-gallery.com › the python graph gallery › scatterplot › selecting color palettes with seaborn
Selecting Color Palettes with Seaborn
2 weeks ago - Edit code✨Still copy-pasting code? Let AI write it for you · You can control the colors using set_palette() function of seaborn.
🌐
Medium
medium.com › analytics-vidhya › deep-dive-into-seaborn-palettes-7b5fae5a258e
Deep Dive into Seaborn: Color Palettes | by Yoann Mocquin | Analytics Vidhya | Medium
November 24, 2022 - the hex space : a color is defined by 6 hex-characters #RRGGBB where RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.
🌐
Practicalpythonfordatascience
practicalpythonfordatascience.com › ap_seaborn_palette
Seaborn Color Palettes — Practical Python for Data Science
Here are some options for Seaborn palette: Below is a complete list of all palette options. Most palettes can have the suffix "_r" to indicate the same palette but reversed order. A few palettes can have "_d" appended at the end which indicates a darker version of the original palette. sns.color_palette(palette='Accent') sns.color_palette(palette='Blues') sns.color_palette(palette='Blues_d') sns.color_palette(palette='BrBG') sns.color_palette(palette='BuGn') sns.color_palette(palette='BuPu') sns.color_palette(palette='CMRmap') sns.color_palette(palette='Dark2') sns.color_palette(palette='GnBu'
🌐
YouTube
youtube.com › watch
Seaborn Color Palette Basics | Using named and custom color palettes in Python seaborn - YouTube
Explore seaborn color palettes with this video tutorial on seaborn palette options. We start with the basics of seaborn's default color palette through the ...
Published: August 23, 2021
🌐
YouTube
youtube.com › watch
How Do Seaborn Color Palettes Impact Data Interpretation? - Python Code School - YouTube
How Do Seaborn Color Palettes Impact Data Interpretation? Are you interested in making your data visualizations more effective and easier to interpret? In th...
Published: November 2, 2025
🌐
GeeksforGeeks
geeksforgeeks.org › data visualization › changing-plot-colors-in-seaborn-a-comprehensive-guide
Changing Plot Colors in Seaborn : A Comprehensive Guide - GeeksforGeeks
July 11, 2024 - To change the color of a single line in a Seaborn plot, you can use the color parameter within the lineplot() function. This parameter accepts various color formats, including named colors, hex codes, and RGB tuples.