Skip to content

TW3

ggsci.palettes

Palette functions for ggsci

This module provides palette generation functions that return colors based on the requested number and palette parameters.

pal_tw3(palette='blue', n=11, alpha=1.0, reverse=False)

Tailwind CSS 3 color palette (continuous/sequential)

Parameters

palette : str Palette name: "slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", or "rose". n : int Number of colors to generate. alpha : float Transparency level, between 0 and 1. reverse : bool Whether to reverse the color order.

Returns

List[str] List of hex color codes.

ggsci.scales

Plotnine scales for ggsci palettes

scale_colour_tw3 = scale_color_tw3 module-attribute

scale_color_tw3(palette='blue', alpha=1.0, reverse=False, **kwargs)

Tailwind CSS 3 color scale (continuous/sequential)

Parameters

palette : str Palette name: "slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", or "rose". alpha : float Transparency level, between 0 and 1. reverse : bool Whether to reverse the color order. **kwargs Additional arguments passed to plotnine.scale_color_gradientn.

scale_fill_tw3(palette='blue', alpha=1.0, reverse=False, **kwargs)

Tailwind CSS 3 fill scale (continuous/sequential)

Parameters

palette : str Palette name: "slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", or "rose". alpha : float Transparency level, between 0 and 1. reverse : bool Whether to reverse the color order. **kwargs Additional arguments passed to plotnine.scale_fill_gradientn.