Use the tab10 palette:

sns.color_palette("tab10")

or in your case:

sns.violinplot(..., palette="tab10")

EDIT:

You also need saturation=1:

sns.violinplot(..., palette="tab10", saturation=1)
Answer from BigBen on Stack Overflow
๐ŸŒ
Seaborn
seaborn.pydata.org โ€บ tutorial โ€บ color_palettes.html
Choosing color palettes โ€” seaborn 0.13.2 documentation
These colors have the same ordering as the default matplotlib color palette, "tab10", but they are a bit less intense. Compare: ... Seaborn in fact has six variations of matplotlibโ€™s palette, called deep, muted, pastel, bright, dark, and colorblind.
๐ŸŒ
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'
๐ŸŒ
Codecademy
codecademy.com โ€บ article โ€บ seaborn-color-palettes-complete-guide-to-data-visualization-colors
Seaborn Color Palettes: Complete Guide to Data Visualization Colors | Codecademy
A Seaborn color palette defines the colors used in your plots and can be created using the sns.color_palette() function. This function accepts any of the built-in Seaborn palettes, such as "deep", "muted", or "bright".
๐ŸŒ
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, ...
๐ŸŒ
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 grey(#947e94) dull red(#bb3f3f)mustard brown(#ac7e04)avocado green(#87a922)light seafoam(#a0febf)cadet blue(#4e7496)pink purple(#db4bda) dried blood(#4b0101)poop brown(#7a5901)pale olive(#b9cc81)dark mint(#48c072)bluish(#2976bb)deep violet(#490648) dark red(#840000)poop(#7f5e00)army green(#4b5d16)cool
๐ŸŒ
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 - Seaborn offers several built-in color palettes and allows for extensive customization. The primary methods to change colors in Seaborn plots include using the color parameter for single colors and the palette parameter for multiple colors.
Find elsewhere
๐ŸŒ
Medium
medium.com โ€บ data-science-collective โ€บ finding-the-best-color-blind-friendly-palette-on-python-seaborn-0546e4ed33f3
Finding the Best Color-blind Friendly Palette on Python Seaborn | by Boriharn K | Data Science Collective | Medium
August 9, 2025 - Especially when making complex data visualizations, applying different colors can help users to indicate quantity or distinguish categories better. In Python, coloring a chart is a piece of cake, it can be done by using ready-to-use palettes. The most common ones are Seabornโ€™s color palettes.
๐ŸŒ
Kaggle
kaggle.com โ€บ code โ€บ analystoleksandra โ€บ colour-palettes-of-seaborn
Colour palettes of seaborn
October 22, 2023 - Exploring colour palettes of seabornIntroductionTable of ContentsPalettesQualitative colour palettesSequential colour palettesDiverging colour palettesVisualisationsScatter plotBox PlotHeatmapKernel Density Estimation (KDE)References
๐ŸŒ
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", "#8172B3", "#CCB974", "#64B5CD"], muted=["#4878D0", "#EE854A", "#6ACC64", "#D65F5F", "#956CB4", "#8C613C", "#DC7EC0", "#797979", "#D5BB67", "#82C6E2"], muted6=["#4878D0", "#6ACC64", "#D65F5F", "#956CB4", "#D5BB67", "#82C6E2"], pastel=["#A1C9F4", "#FFB482", "#8DE5A1", "#FF9F9B", "#D0BBFF", "#DE
๐ŸŒ
Seaborn
seaborn.pydata.org โ€บ generated โ€บ seaborn.hls_palette.html
seaborn.hls_palette โ€” seaborn 0.13.2 documentation
seaborn.hls_palette(n_colors=6, h=0.01, l=0.6, s=0.65, as_cmap=False)# Return hues with constant lightness and saturation in the HLS system. The hues are evenly sampled along a circular path. The resulting palette will be appropriate for categorical or cyclical data.
๐ŸŒ
Matplotlib
matplotlib.org โ€บ stable โ€บ gallery โ€บ color โ€บ named_colors.html
List of named colors โ€” Matplotlib 3.11.2 documentation
First we define a helper function for making a table of colors, then we use it on some common color categories.
๐ŸŒ
Seaborn
seaborn.pydata.org โ€บ generated โ€บ seaborn.xkcd_palette.html
seaborn.xkcd_palette โ€” seaborn 0.13.2 documentation
See xkcd for the full list of colors: https://xkcd.com/color/rgb/ This is just a simple wrapper around the seaborn.xkcd_rgb dictionary.
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:

๐ŸŒ
Seaborn
seaborn.pydata.org โ€บ generated โ€บ seaborn.set_palette.html
seaborn.set_palette โ€” seaborn 0.13.2 documentation
The default number of colors will depend on the format of palette, see the color_palette() documentation for more information.
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ seaborn-palettes
Seaborn Color Palette: Quick Guide to Picking Colors | DataCamp
September 30, 2024 - The color_palette() function is Seabornโ€™s way of creating custom color palettes. It allows you to switch between these different types of palettes by changing the palette name and the number of colors. When using named palettes (like "pastel" or "Blues"), the number parameter determines how many colors you see.
๐ŸŒ
Matplotlib
matplotlib.org โ€บ stable โ€บ users โ€บ explain โ€บ colors โ€บ colors.html
Specifying colors โ€” Matplotlib 3.11.2 documentation
import matplotlib.pyplot as plt import numpy as np import matplotlib as mpl th = np.linspace(0, 2*np.pi, 128) def demo(sty): mpl.style.use(sty) fig, ax = plt.subplots(figsize=(3, 3)) ax.set_title(f'style: {sty!r}', color='C0') ax.plot(th, np.cos(th), 'C1', label='C1') ax.plot(th, np.sin(th), 'C2', label='C2') ax.legend() demo('default') demo('seaborn-v0_8') The first color 'C0' is the title.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ numpy โ€บ numpy_random_seaborn.asp
Seaborn
Seaborn is a library that uses Matplotlib underneath to plot graphs. It will be used to visualize random distributions.