SYMBOL INDEX (183 symbols across 25 files) FILE: cypress.config.cjs method setupNodeEvents (line 7) | setupNodeEvents(on, config) { FILE: cypress/e2e/api.cy.js function rgbCount (line 1) | function rgbCount(text) { function testPaletteCount (line 60) | function testPaletteCount(num) { FILE: src/api.ts function configure (line 35) | function configure(opts: { function getLoader (line 47) | async function getLoader(perCall?: PixelLoader): Promise { function checkAborted (line 70) | function checkAborted(signal?: AbortSignal): void { function loadPixels (line 76) | async function loadPixels( function getColor (line 97) | async function getColor( function getPalette (line 116) | async function getPalette( function getSwatches (line 167) | async function getSwatches( FILE: src/cli.ts constant HELP (line 18) | const HELP = ` type Command (line 43) | type Command = 'color' | 'palette' | 'swatches'; type CliArgs (line 45) | interface CliArgs { function parseCliArgs (line 55) | function parseCliArgs(argv: string[]): CliArgs { function readStdin (line 138) | async function readStdin(): Promise { function ansiSwatch (line 152) | function ansiSwatch(hex: string): string { function colorToJson (line 160) | function colorToJson(c: Color): Record { function swatchMapToJson (line 172) | function swatchMapToJson(swatches: SwatchMap): Record { function colorCss (line 185) | function colorCss(c: Color): string { function paletteCss (line 189) | function paletteCss(colors: Color[]): string { function swatchesCss (line 194) | function swatchesCss(swatches: SwatchMap): string { function colorAnsi (line 208) | function colorAnsi(c: Color): string { function paletteAnsi (line 212) | function paletteAnsi(colors: Color[]): string { function swatchesAnsi (line 216) | function swatchesAnsi(swatches: SwatchMap): string { function processFile (line 230) | async function processFile( function formatResult (line 256) | function formatResult( function main (line 298) | async function main(): Promise { FILE: src/color-space.ts function srgbToLinear (line 8) | function srgbToLinear(c: number): number { function linearToSrgb (line 14) | function linearToSrgb(c: number): number { function rgbToOklch (line 24) | function rgbToOklch(r: number, g: number, b: number): OKLCH { function oklchToRgb (line 58) | function oklchToRgb(l: number, c: number, h: number): [number, number, n... function pixelsRgbToOklchScaled (line 92) | function pixelsRgbToOklchScaled( function paletteOklchScaledToRgb (line 111) | function paletteOklchScaledToRgb( FILE: src/color.ts function rgbToHsl (line 8) | function rgbToHsl(r: number, g: number, b: number): HSL { function relativeLuminance (line 39) | function relativeLuminance(r: number, g: number, b: number): number { function contrastRatio (line 48) | function contrastRatio(l1: number, l2: number): number { class ColorImpl (line 58) | class ColorImpl implements Color { method constructor (line 70) | constructor(r: number, g: number, b: number, population: number, propo... method rgb (line 78) | rgb(): RGB { method hex (line 82) | hex(): string { method hsl (line 87) | hsl(): HSL { method oklch (line 94) | oklch(): OKLCH { method css (line 101) | css(format: CssColorFormat = 'rgb'): string { method array (line 117) | array(): [number, number, number] { method toString (line 121) | toString(): string { method textColor (line 125) | get textColor(): string { method luminance (line 129) | private get luminance(): number { method isDark (line 136) | get isDark(): boolean { method isLight (line 140) | get isLight(): boolean { method contrast (line 144) | get contrast(): ContrastInfo { function createColor (line 167) | function createColor( FILE: src/loaders/browser.ts class BrowserPixelLoader (line 7) | class BrowserPixelLoader implements PixelLoader { method load (line 8) | async load(source: BrowserSource): Promise { method loadFromImage (line 36) | private loadFromImage(img: HTMLImageElement): PixelData { method loadFromCanvas (line 67) | private loadFromCanvas(canvas: HTMLCanvasElement): PixelData { method loadFromVideo (line 74) | private loadFromVideo(video: HTMLVideoElement): PixelData { method loadFromOffscreenCanvas (line 96) | private loadFromOffscreenCanvas(canvas: OffscreenCanvas): PixelData { method loadFromImageBitmap (line 108) | private loadFromImageBitmap(bitmap: ImageBitmap): PixelData { FILE: src/loaders/node.ts type NodeImageDecoder (line 4) | type NodeImageDecoder = ( type NodeLoaderOptions (line 8) | interface NodeLoaderOptions { class NodePixelLoader (line 20) | class NodePixelLoader implements PixelLoader { method constructor (line 23) | constructor(options?: NodeLoaderOptions) { method load (line 27) | async load(source: NodeSource): Promise { function defaultSharpDecoder (line 38) | async function defaultSharpDecoder( function createNodeLoader (line 61) | function createNodeLoader(options?: NodeLoaderOptions): NodePixelLoader { FILE: src/observe.ts type ObservableSource (line 18) | type ObservableSource = type ObserveOptions (line 24) | interface ObserveOptions extends FilterOptions { type ObserveController (line 38) | interface ObserveController { function observe (line 69) | function observe( FILE: src/pipeline.ts type ValidatedOptions (line 18) | interface ValidatedOptions { function validateOptions (line 28) | function validateOptions(options: ExtractionOptions): ValidatedOptions { function createPixelArray (line 77) | function createPixelArray( function computeFallbackColor (line 128) | function computeFallbackColor( function extractPalette (line 159) | function extractPalette( FILE: src/progressive.ts constant PASSES (line 10) | const PASSES = [ function yieldToMain (line 17) | function yieldToMain(): Promise { FILE: src/quantizers/mmcq.ts constant SIGBITS (line 7) | const SIGBITS = 5; constant RSHIFT (line 8) | const RSHIFT = 8 - SIGBITS; constant MAX_ITERATIONS (line 9) | const MAX_ITERATIONS = 1000; constant FRACT_BY_POPULATIONS (line 10) | const FRACT_BY_POPULATIONS = 0.75; constant HISTO_SIZE (line 11) | const HISTO_SIZE = 1 << (3 * SIGBITS); function getColorIndex (line 17) | function getColorIndex(r: number, g: number, b: number): number { class VBox (line 25) | class VBox { method constructor (line 38) | constructor( method volume (line 56) | volume(force = false): number { method count (line 66) | count(force = false): number { method copy (line 81) | copy(): VBox { method avg (line 85) | avg(force = false): [number, number, number] { class PQueue (line 137) | class PQueue { method constructor (line 141) | constructor(private comparator: (a: T, b: T) => number) {} method sort (line 143) | private sort(): void { method push (line 148) | push(item: T): void { method peek (line 153) | peek(index?: number): T { method pop (line 158) | pop(): T { method size (line 163) | size(): number { method map (line 167) | map(fn: (item: T) => U): U[] { function getHisto (line 176) | function getHisto(pixels: Array<[number, number, number]>): Uint32Array { function vboxFromPixels (line 187) | function vboxFromPixels( function medianCutApply (line 217) | function medianCutApply(histo: Uint32Array, vbox: VBox): [VBox, VBox | n... function iterate (line 313) | function iterate(pq: PQueue, target: number, histo: Uint32Array): ... function quantize (line 343) | function quantize( class MmcqQuantizer (line 410) | class MmcqQuantizer implements Quantizer { method init (line 411) | async init(): Promise { method quantize (line 415) | quantize( FILE: src/quantizers/wasm.ts class WasmQuantizer (line 17) | class WasmQuantizer implements Quantizer { method constructor (line 25) | constructor(wasmUrl?: string | URL) { method init (line 29) | async init(): Promise { method quantize (line 58) | quantize( FILE: src/resolve-loader.browser.ts function resolveDefaultLoader (line 8) | async function resolveDefaultLoader(): Promise> { FILE: src/resolve-loader.ts function resolveDefaultLoader (line 10) | async function resolveDefaultLoader(): Promise> { FILE: src/swatches.ts type SwatchTarget (line 8) | interface SwatchTarget { constant TARGETS (line 21) | const TARGETS: SwatchTarget[] = [ constant WEIGHT_L (line 34) | const WEIGHT_L = 6; constant WEIGHT_C (line 35) | const WEIGHT_C = 3; constant WEIGHT_POP (line 36) | const WEIGHT_POP = 1; function score (line 38) | function score( constant WHITE (line 61) | const WHITE = createColor(255, 255, 255, 0); constant BLACK (line 62) | const BLACK = createColor(0, 0, 0, 0); function textColors (line 64) | function textColors(color: Color): { title: Color; body: Color } { function classifySwatches (line 76) | function classifySwatches(palette: Color[]): SwatchMap { FILE: src/sync.ts type SyncExtractionOptions (line 27) | interface SyncExtractionOptions extends FilterOptions { function getColorSync (line 57) | function getColorSync( function getPaletteSync (line 73) | function getPaletteSync( function getSwatchesSync (line 102) | function getSwatchesSync( function loadPixelsSync (line 114) | function loadPixelsSync(source: BrowserSource) { function loadFromImage (line 138) | function loadFromImage(img: HTMLImageElement) { function loadFromCanvas (line 169) | function loadFromCanvas(canvas: HTMLCanvasElement) { function loadFromVideo (line 176) | function loadFromVideo(video: HTMLVideoElement) { function loadFromOffscreenCanvas (line 198) | function loadFromOffscreenCanvas(canvas: OffscreenCanvas) { function loadFromImageBitmap (line 210) | function loadFromImageBitmap(bitmap: ImageBitmap) { FILE: src/types.ts type RGB (line 6) | interface RGB { type HSL (line 13) | interface HSL { type OKLCH (line 20) | interface OKLCH { type PixelBuffer (line 31) | type PixelBuffer = Uint8Array | Uint8ClampedArray; type PixelData (line 34) | interface PixelData { type FilterOptions (line 45) | interface FilterOptions { type ColorSpace (line 57) | type ColorSpace = 'rgb' | 'oklch'; type ExtractionOptions (line 60) | interface ExtractionOptions extends FilterOptions { type ContrastInfo (line 82) | interface ContrastInfo { type CssColorFormat (line 92) | type CssColorFormat = 'rgb' | 'hsl' | 'oklch'; type Color (line 95) | interface Color { type SwatchRole (line 128) | type SwatchRole = type Swatch (line 137) | interface Swatch { type SwatchMap (line 145) | type SwatchMap = Record; type PixelLoader (line 152) | interface PixelLoader { type Quantizer (line 158) | interface Quantizer { type BrowserSource (line 173) | type BrowserSource = type NodeSource (line 182) | type NodeSource = string | Buffer; type ImageSource (line 185) | type ImageSource = BrowserSource | NodeSource; type ProgressiveResult (line 192) | interface ProgressiveResult { FILE: src/wasm/src/lib.rs constant SIGBITS (line 7) | const SIGBITS: u32 = 5; constant RSHIFT (line 8) | const RSHIFT: u32 = 8 - SIGBITS; constant HIST_SIZE (line 9) | const HIST_SIZE: usize = 1 << (3 * SIGBITS); constant MAX_ITERATIONS (line 10) | const MAX_ITERATIONS: usize = 1000; constant FRACT_BY_POPULATION (line 11) | const FRACT_BY_POPULATION: f64 = 0.75; function color_index (line 17) | fn color_index(r: u32, g: u32, b: u32) -> usize { function build_histogram (line 21) | fn build_histogram(pixels: &[u8]) -> (Vec, usize) { type VBox (line 40) | struct VBox { method from_pixels (line 52) | fn from_pixels(pixels: &[u8]) -> Self { method update_count (line 80) | fn update_count(&mut self, hist: &[u32]) { method update_volume (line 92) | fn update_volume(&mut self) { method avg_color (line 98) | fn avg_color(&self, hist: &[u32]) -> (u8, u8, u8, u32) { method widest_dimension (line 133) | fn widest_dimension(&self) -> u8 { function median_cut (line 147) | fn median_cut(hist: &[u32], vbox: &VBox) -> Option<(VBox, VBox)> { function iterate (line 233) | fn iterate( function quantize (line 292) | pub fn quantize(pixels: &[u8], max_colors: usize) -> Vec { function test_single_color (line 333) | fn test_single_color() { function test_two_colors (line 345) | fn test_two_colors() { function test_empty_input (line 355) | fn test_empty_input() { FILE: src/worker/manager.ts function isWorkerSupported (line 14) | function isWorkerSupported(): boolean { function getOrCreateWorker (line 18) | function getOrCreateWorker(): Worker { function extractInWorker (line 58) | function extractInWorker( function terminateWorker (line 91) | function terminateWorker(): void { FILE: src/worker/worker-script.ts constant WORKER_SOURCE (line 13) | const WORKER_SOURCE = /* js */ ` FILE: test/cli-test.js function run (line 14) | function run(...args) { function runWithStdin (line 18) | function runWithStdin(filePath, ...args) { FILE: test/node-cjs-test.cjs function isColorObject (line 14) | function isColorObject(c) { FILE: test/node-test.js function isColorObject (line 18) | function isColorObject(c) { function isValidRGB (line 34) | function isValidRGB(color) { function isCloseTo (line 39) | function isCloseTo(color, expected, tolerance = 15) { FILE: tsup.config.ts method setup (line 11) | setup(build) { method esbuildOptions (line 65) | esbuildOptions(options) {