Seaborn.choose_dark_palette() method



Seaborn.choose_ldark_palette() method is used make a dark sequential palette as an interactive widget.

This is the equivalent of the dark palette() function. This type of palette works well with data that have both fascinating high values and relatively uninteresting low values.

Note − This method is only executable in IPython notebook 2+ versions.

Syntax

Following is the syntax of the Seaborn.choose_dark_palette() method −

seaborn.choose_light_palette(input='husl/hls/rgb', as_cmap=False)

Parameters

Following is the list of parameters of this method −

S.No Parameter and Description
1 Input

Takes input from HLS, HUSL, RGB this is the color space for the value.

2 As_cmap

This optional parameter takes Boolean values and if true returns an matplotlib colormap.

Return Value

This method returns either a list of colors or a matplotlib colormap. We will see the working of this method in the coming examples.

Example 1

In this example, we will see how the seaborn.chosee_dark_palette() method enables users to choose the colors and provides progress bars to alter the colors and produce a desired pallet in an easy manner. In this example, we will see the HUSL color space.

The below line of code can be used to do so.

sns.choose_dark_palette(input='husl', as_cmap=False)

Output

the output generated is as follows.

seaborn_choose_dark_palette_method

In the above image, the h,s,l represent the hue, saturation and lightness of the colors respectively. And the n represents the number of colors to be shown int the palette in this way we can easily choose the colors required for our application.

Example 2

In this example, we will see how the seaborn.chosee_dark_palette() method enables users to choose the colors and provides progress bars to alter the colors and produce a desired pallet in an easy manner. In this example, we will see the HLS color space.

The below line of code can be used to do so.

sns.choose_dark_palette(input='hls', as_cmap=False)

Output

the output generated is as follows.

choose_dark_palette_method

In the above image, the h,s,l represent the hue, saturation and lightness of the colors respectively. And the n represents the number of colors to be shown in the palette in this way we can easily choose the colors required for our application.

Example 3

In this example, we will see how the seaborn.chosee_dark_palette() method enables users to choose the colors and provides progress bars to alter the colors and produce a desired pallet in an easy manner. In this example, we will see the RGB color space.

The below line of code can be used to do so.

sns.choose_dark_palette(input='rgb', as_cmap=False)

Output

The output generated is as follows.

choose_dark_palette

In the above image, the HSL represent the hue, saturation and lightness of the colors respectively. And the n represents the number of colors to be shown in the palette in this way we can easily choose the colors required for our application.

seaborn_palette_widgets_introduction.htm
Advertisements