Saturon LogoSaturon

🚧 This documentation covers a pre-1.0 release. Expect breaking changes.

API

Config and Defaults

Documentation of configuration options and default settings in Saturon.

The "saturon/config" module exports the global configuration object used throughout the Saturon library together with the system color definitions object. This configuration allows users to customize default behaviors such as gamut mapping methods, theme preferences, and system color definitions.

Exported Configs

export const config: Config;

export const systemColors: {
    AccentColor: number[][];
    AccentColorText: number[][];
    // ...
};

Shape (Config interface)

interface Config {
    /** Global default fit method for gamut mapping */
    defaults?: { fit?: FitMethod };

    /** Theme / system-color overrides */
    theme?: "light" | "dark";

    /** Custom system colors (e.g., CanvasText) with their light-dark RGB values */
    systemColors?: Record<string, number[][]>;
}