Package 'mixboxr'

Title: Color Blending with 'Mixbox'
Description: Offers blending method for natural color mixing with the C/C++ implmentation of 'Mixbox' <https://github.com/scrtwpns/mixbox> library.
Authors: Akiru Kato [aut, cre], Secret Weapons [cph]
Maintainer: Akiru Kato <[email protected]>
License: file LICENSE
Version: 0.0.3
Built: 2026-05-28 07:35:07 UTC
Source: https://github.com/paithiov909/mixboxr

Help Index


Mixbox blending of two colors

Description

Blends two colors using the 'Mixbox' algorithm. The input is expected to be an integer vector with the color channels packed in the following way:

  • red: bits 0-7

  • green: bits 8-15

  • blue: bits 16-23

  • alpha: bits 24-31

You can use colorfast::col_to_int() to convert colors to integers and colorfast::int_to_col() to convert integers back to hexdecimal colors.

Usage

lerp(x, y, t)

Arguments

x, y

Colors to blend

t

Mixing ratio

Value

Returns blended colors as native packed integers. For lerp.nativeRaster(), it returns a nativeRaster object.

See Also