@pbroom/color-kit/interopTypes

UnpackColorsOptions

Options for unpackColors.

interfaceimport type { UnpackColorsOptions } from '@pbroom/color-kit/interop';types.ts:95
interface UnpackColorsOptions {
  alpha?: boolean;
  stride?: number;
  offset?: number;
  count?: number;
}

Properties

alpha?booleandefault false
Read alpha from the fourth component of each color. When false, alpha is 1.
stride?numberdefault alpha ? 4 : 3
Distance, in array elements, between the first components of consecutive colors.
offset?numberdefault 0
Array index of the first color's first component.
count?numberdefault as many complete colors as fit after `offset
Number of colors to read.

Also exported from