Arcane OS Docs Development only

Reference

Arcane.appearance.apply()

Applies supported current-user native appearance values and returns the resulting state. Requires appearance.write; Linux currently reports unsupported without claiming a mutation.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.appearance.apply(appearance)

Parameters

{scheme?:"system"|"light"|"dark", captionColor?, textColor?} with custom colors in rgb(r, g, b) form

Return value

Promise<{supported, platform, scheme, effectiveScheme, captionColor, textColor}>

Description

Applies supported current-user native appearance values and returns the resulting state. Requires appearance.write; Linux currently reports unsupported without claiming a mutation.

Overview

Applies the supported native appearance for the current user and returns the resulting state. On Microsoft NT it stores the Arcane choice, updates light/dark system values, and broadcasts an appearance change. Choosing system restores the captured baseline and removes Arcane custom caption colors.

Appearance contract

Requires appearance.write. Pass only scheme, captionColor, and textColor. The scheme defaults to system. Custom colors apply only to light or dark and must use rgb(r, g, b) with channels from 0 through 255. Microsoft NT rejects unknown fields and malformed colors. Linux currently does not validate the supplied appearance object; it resolves to its supported:false status without claiming a native mutation. Always send the portable contract instead of using an unsupported host as a validator.

Listen for appearance.changed when the surrounding UI needs to react to a host-originated appearance update.

Example

async function applyDarkNativeAppearance() {
    const result = await Arcane.appearance.apply({
        scheme: 'dark',
        captionColor: 'rgb(24, 27, 38)',
        textColor: 'rgb(244, 246, 255)'
    });
    console.log(result.effectiveScheme);
}

document.querySelector('#use-dark-appearance')?.addEventListener(
    'click',
    async function handleDarkAppearanceRequest() {
        await applyDarkNativeAppearance();
    }
);

Reference group

Filesystem, storage, preferences, and appearance

Repository and reviewed source access