Skip to content

Pika ​

Pika is a native color picker for macOS. Protocol Launcher allows you to generate deep links to control Pika's color picking, formatting, and appearance settings.

Usage ​

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Actions ​

Swap ​

On-Demand
ts
import { swap } from 'protocol-launcher/pika'

const url = swap()

Undo ​

On-Demand
ts
import { undo } from 'protocol-launcher/pika'

const url = undo()

Redo ​

On-Demand
ts
import { redo } from 'protocol-launcher/pika'

const url = redo()

Appearance ​

Light ​

On-Demand
ts
import { light } from 'protocol-launcher/pika'

const url = light()

Dark ​

On-Demand
ts
import { dark } from 'protocol-launcher/pika'

const url = dark()

System ​

On-Demand
ts
import { system } from 'protocol-launcher/pika'

const url = system()

Copy ​

Copy Foreground ​

On-Demand
ts
import { copyForeground } from 'protocol-launcher/pika'

const url = copyForeground()

Copy Background ​

On-Demand
ts
import { copyBackground } from 'protocol-launcher/pika'

const url = copyBackground()

Copy Text ​

On-Demand
ts
import { copyText } from 'protocol-launcher/pika'

const url = copyText()

Copy JSON ​

On-Demand
ts
import { copyJson } from 'protocol-launcher/pika'

const url = copyJson()

Format ​

Format Hex ​

On-Demand
ts
import { formatHex } from 'protocol-launcher/pika'

const url = formatHex()

Format RGB ​

On-Demand
ts
import { formatRgb } from 'protocol-launcher/pika'

const url = formatRgb()

Format HSB ​

On-Demand
ts
import { formatHsb } from 'protocol-launcher/pika'

const url = formatHsb()

Format HSL ​

On-Demand
ts
import { formatHsl } from 'protocol-launcher/pika'

const url = formatHsl()

Format LAB ​

On-Demand
ts
import { formatLab } from 'protocol-launcher/pika'

const url = formatLab()

Format OpenGL ​

On-Demand
ts
import { formatOpenGL } from 'protocol-launcher/pika'

const url = formatOpenGL()

Format OKLCH ​

On-Demand
ts
import { formatOklch } from 'protocol-launcher/pika'

const url = formatOklch()

History ​

Show History ​

On-Demand
ts
import { showHistory } from 'protocol-launcher/pika'

const url = showHistory()

Hide History ​

On-Demand
ts
import { hideHistory } from 'protocol-launcher/pika'

const url = hideHistory()

Toggle History ​

On-Demand
ts
import { toggleHistory } from 'protocol-launcher/pika'

const url = toggleHistory()

Pick ​

Pick Foreground ​

On-Demand
ts
import { pickForeground } from 'protocol-launcher/pika'

const url = pickForeground({
  type: 'hex',
})

Pick Background ​

On-Demand
ts
import { pickBackground } from 'protocol-launcher/pika'

const url = pickBackground({
  type: 'rgb',
})

Set Color ​

Set Foreground ​

On-Demand
ts
import { setForeground } from 'protocol-launcher/pika'

const url = setForeground({
  hex: 'fbbf24',
})

Set Background ​

On-Demand
ts
import { setBackground } from 'protocol-launcher/pika'

const url = setBackground({
  hex: 'e74661',
})

System ​

System Foreground ​

On-Demand
ts
import { systemForeground } from 'protocol-launcher/pika'

const url = systemForeground()

System Background ​

On-Demand
ts
import { systemBackground } from 'protocol-launcher/pika'

const url = systemBackground()

Window ​

About ​

On-Demand
ts
import { about } from 'protocol-launcher/pika'

const url = about()

Help ​

On-Demand
ts
import { help } from 'protocol-launcher/pika'

const url = help()

Preferences ​

On-Demand
ts
import { preferences } from 'protocol-launcher/pika'

const url = preferences()

Resize ​

On-Demand
ts
import { resize } from 'protocol-launcher/pika'

const url = resize({
  width: 480,
  height: 300,
})