pixel-data-js
    Preparing search index...

    Function lerpColor32Fast

    • Linearly interpolates between two 32-bit colors using integer fixed-point math. Highly optimized for image processing and real-time blitting. It processes channels in parallel using bitmasks (RB and GA pairs).

      Parameters

      • src: Color32

        The source (foreground) color as a 32-bit integer.

      • dst: Color32

        The destination (background) color as a 32-bit integer.

      • w: number

        The blend weight as a byte value from 0 to 255. Where 0 is 100% dst and 255 is 100% src

      Returns Color32

      The blended 32-bit color.

      Subject to a 1-bit drift (rounding down) due to fast bit-shift division.