prep_color

prep_color(base=None, palette=None, blending=None, index=None, lighten=None, saturate=None, modifier=None, shift=False, absolute=False, clip=True, color_space='rgb', modification_space='lab', return_color_code=True, alpha=None, cycle=None): 

LLM Docstring

Module-level shortcut for ColorPalette.prep_color: compose a color from a base color or palette with optional blending/indexing and saturate/lighten/modify/alpha transformations.

  • base: Any

    an explicit base color

  • palette: Any

    a palette to draw from

  • blending: Any

    a blend amount

  • index: Any

    a palette index

  • lighten: Any

    a lighten amount

  • saturate: Any

    a saturate amount

  • modifier: Any

    a custom modification callback

  • shift: bool

    apply modifications additively

  • absolute: bool

    set rather than scale the modified channel

  • clip: bool

    clip the result

  • color_space: str

    the working color space

  • modification_space: str

    the modification space

  • return_color_code: bool

    return hex codes

  • alpha: Any

    an alpha value

  • cycle: Any

    cycle the palette when indexing

  • :returns: _

    the composed color(s)


Feedback

Examples

Templates

Documentation