Skip to main content

in_color_phase

Function in_color_phase 

Source
pub const fn in_color_phase(color: usize, phase: usize) -> bool
Expand description

Return true when the chroma square wave for hue color (0..15) is in its “high” state at subcarrier phase phase (0..12).

This is Bisqwit’s InColorPhase: ((color + phase) % 12) < 6. It is the phase generator that positions each of the twelve hues on the color wheel. (Note the phase convention differs from palette_gen’s + 8 offset — the two are independent decoders; what matters is that this module is self-consistent with the Bisqwit decode a signal shader performs.)