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
ts
import { swap } from 'protocol-launcher/pika'
const url = swap()Undo
ts
import { undo } from 'protocol-launcher/pika'
const url = undo()Redo
ts
import { redo } from 'protocol-launcher/pika'
const url = redo()Appearance
Light
ts
import { light } from 'protocol-launcher/pika'
const url = light()Dark
ts
import { dark } from 'protocol-launcher/pika'
const url = dark()System
ts
import { system } from 'protocol-launcher/pika'
const url = system()Copy
Copy Foreground
ts
import { copyForeground } from 'protocol-launcher/pika'
const url = copyForeground()Copy Background
ts
import { copyBackground } from 'protocol-launcher/pika'
const url = copyBackground()Copy Text
ts
import { copyText } from 'protocol-launcher/pika'
const url = copyText()Copy JSON
ts
import { copyJson } from 'protocol-launcher/pika'
const url = copyJson()Format
Format Hex
ts
import { formatHex } from 'protocol-launcher/pika'
const url = formatHex()Format RGB
ts
import { formatRgb } from 'protocol-launcher/pika'
const url = formatRgb()Format HSB
ts
import { formatHsb } from 'protocol-launcher/pika'
const url = formatHsb()Format HSL
ts
import { formatHsl } from 'protocol-launcher/pika'
const url = formatHsl()Format LAB
ts
import { formatLab } from 'protocol-launcher/pika'
const url = formatLab()Format OpenGL
ts
import { formatOpenGL } from 'protocol-launcher/pika'
const url = formatOpenGL()Format OKLCH
ts
import { formatOklch } from 'protocol-launcher/pika'
const url = formatOklch()History
Show History
ts
import { showHistory } from 'protocol-launcher/pika'
const url = showHistory()Hide History
ts
import { hideHistory } from 'protocol-launcher/pika'
const url = hideHistory()Toggle History
ts
import { toggleHistory } from 'protocol-launcher/pika'
const url = toggleHistory()Pick
Pick Foreground
ts
import { pickForeground } from 'protocol-launcher/pika'
const url = pickForeground({
type: 'hex',
})Pick Background
ts
import { pickBackground } from 'protocol-launcher/pika'
const url = pickBackground({
type: 'rgb',
})Set Color
Set Foreground
ts
import { setForeground } from 'protocol-launcher/pika'
const url = setForeground({
hex: 'fbbf24',
})Set Background
ts
import { setBackground } from 'protocol-launcher/pika'
const url = setBackground({
hex: 'e74661',
})System
System Foreground
ts
import { systemForeground } from 'protocol-launcher/pika'
const url = systemForeground()System Background
ts
import { systemBackground } from 'protocol-launcher/pika'
const url = systemBackground()Window
About
ts
import { about } from 'protocol-launcher/pika'
const url = about()Help
ts
import { help } from 'protocol-launcher/pika'
const url = help()Preferences
ts
import { preferences } from 'protocol-launcher/pika'
const url = preferences()Resize
ts
import { resize } from 'protocol-launcher/pika'
const url = resize({
width: 480,
height: 300,
})