Rootless

Automate iOS, iPadOS, and macOS using plain JavaScript. Build custom widgets and interact directly with native APIs.

Download on the App Store
Rootless app interface

Plain JavaScript

Supports ES6. Scripts are stored as plain .js files on your disk.

Native APIs & Documentation

Integrate directly with iOS native APIs. Fully documented, available offline.

Siri Shortcuts

Trigger scripts via Siri. Present tables, websites, and custom HTML natively.

System Integration

Run from the Share Sheet, process inputs, and manage local files via Files.app.

x-callback-url

Communicate seamlessly and trigger workflows with other apps on your device.

Customizable & Ready

Tailor the code editor to your liking. Includes several example scripts to start immediately.

Documentation

Also inside the app, or as rootless.json.

Color

Color creation and manipulation

Colours from hex, RGB, RGBA or HSL, plus named and semantic system colours. Instance methods adjust opacity and brightness.

Properties

rNumber

Red component (0-1)

gNumber

Green component (0-1)

bNumber

Blue component (0-1)

aNumber

Alpha component (0-1)

Methods

.opacity(value)Color ›

Return a copy with the given opacity (0-1).

  • value Number required
.lighter(amount)Color ›

Return a lighter version of this color.

  • amount Number required
.darker(amount)Color ›

Return a darker version of this color.

  • amount Number required
Color.hex(hex)Color ›

Create a color from a hex string (e.g. '#ff0000').

  • hex String required
Color.rgb(r, g, b)Color ›

Create a color from RGB values (0-255).

  • r Number required
  • g Number required
  • b Number required
Color.rgba(r, g, b, a)Color ›

Create a color from RGBA values (RGB: 0-255, A: 0-1).

  • r Number required
  • g Number required
  • b Number required
  • a Number required
Color.hsl(h, s, l)Color ›

Create a color from HSL values (H: 0-360, S: 0-100, L: 0-100).

  • h Number required
  • s Number required
  • l Number required
Color.white()Color ›

White color.

Color.black()Color ›

Black color.

Color.gray()Color ›

Gray color.

Color.red()Color ›

Red color.

Color.blue()Color ›

Blue color.

Color.green()Color ›

Green color.

Color.orange()Color ›

Orange color.

Color.yellow()Color ›

Yellow color.

Color.purple()Color ›

Purple color.

Color.pink()Color ›

Pink color.

Color.teal()Color ›

Teal color.

Color.mint()Color ›

Mint color.

Color.cyan()Color ›

Cyan color.

Color.brown()Color ›

Brown color.

Color.indigo()Color ›

Indigo color.

Color.clear()Color ›

Transparent color.

Color.label()Color ›

System label color (adapts to light/dark mode).

Color.secondaryLabel()Color ›

System secondary label color.

Color.tertiaryLabel()Color ›

System tertiary label color.

Color.systemBackground()Color ›

System background color.

Color.secondaryBackground()Color ›

System secondary background color.

Color.separator()Color ›

System separator color.

Color.systemFill()Color ›

System fill color.

Examples

Named & hex colors

const red = Color.red();
const custom = Color.hex("#1a73e8");
const semi = custom.opacity(0.5);

Predefined colors

// Named: white, black, gray, red, blue,
// green, orange, yellow, purple, pink,
// teal, mint, cyan, brown, indigo, clear
//
// Semantic: label, secondaryLabel,
// tertiaryLabel, systemBackground,
// secondaryBackground, separator, systemFill

RGB & HSL

const c1 = Color.rgb(26, 115, 232);
const c2 = Color.hsl(217, 80, 50);
const dark = c1.darker(0.2);