binny.style package#

Public API for Binny color palettes and visualization styles.

binny.style.get_colors(n: int, *, pastel_amount: float = 0.25, alpha: float = 1.0) → list[str] | list[tuple[float, float, float, float]]#

Sample colors from the Binny palette.

Parameters:
  • n – Number of colors.

  • pastel_amount – Fraction of white mixed into each color.

  • alpha – Opacity between 0 and 1.

Returns:

Hexadecimal colors if alpha is 1, otherwise RGBA colors.

binny.style.pastelize(color: str, amount: float) → str#

Blend a color with white to produce a pastel shade.

Parameters:
  • color – Matplotlib-compatible color.

  • amount – Fraction of white to mix in, between 0 and 1.

Returns:

Hexadecimal color string.