Skip to content

Hue Rotate ​

Rotate the hue of an image for color shifting and creative effects.

Ready & Demoed

Signature ​

ts
hue_rotate(input: Uint8Array, degrees: number) => Uint8Array

Parameters ​

  • input — Encoded image bytes (PNG or JPEG)
  • degrees — Degrees to rotate hue (0–360)

Returns ​

  • Uint8Array — Encoded PNG bytes of the hue-rotated image

Features ​

  • Shift image colours for creative effects
  • Useful for colour correction or artistic filters

Example ​

ts
import { hue_rotate } from "wasm-image-processor"
const shifted = hue_rotate(uint8Array, 120)

Use Cases ​

  • Artistic colour shifts
  • Colour correction
  • Fun filters