Skip to content

mix_hex_colors API Reference

geoloop.lithology.plot_lithology.mix_hex_colors

mix_hex_colors(
    colors: list[str], fractions: list[float]
) -> str

Combine multiple hex colors using given fractional weights.

Parameters:

Name Type Description Default
colors list of str

Hex color strings (e.g. '#aabbcc').

required
fractions list of float

Fractions for each color. Typically sums to 1. Values may be 0..1.

required

Returns:

Type Description
str

Resulting mixed color as a hex string.