Version 0.42.0 was built on Saturday, January 24, 2026 at GMT-08:00
1769262185508from hashdf5af8a.
Kyrie is your one stop formatting and colorizing shop for Javascript, Typescript, and JSON, to go to your terminal, your HTML, your developer's console, and your logs.
Kyrie is a formatting colorizer for JavaScript, TypeScript, and JSON, with heavy customizability, that you can keep your settings between apps with.
Most new users are here to find one of these things:
log, which directly logs a colorized Javascript value to the console;ansi_from_value, which colorizes a Javascript value;ansi_from_string, which colorizes a string containing a Javascript value;- the envvar
kyrie_default, which locally sets kyrie behavior when not otherwise instructed; or - the
live previewer, to help find a color palette they like quickly.
Turn this:
Into this:
Or this:
Or a million other things.
Useful getting started links:
- 🌈 16 million colors: Uses Chalk with 24-bit RGB color support
- 🎨 42 built-in color palettes: 42 themes, each with a light and dark variant, for 84 total themes
- 🎨 Vision accessability palettes: Palettes for protanopia, deuteranopia, tritanopia, monochromacy, deuteranomaly, protanomaly, tritanomaly, achromatopsia (if you have these, please tell me how to improve these in an issue)
- Bright, subtle, pastel, and vivid variants, each with a light and dark variant
- 🔧 Fully customizable: Create custom palettes and container delimiters
- 📦 AST-based parsing: Parse JSON strings or JavaScript values into detailed AST
- 🔄 Circular reference detection: Safely handles circular object references
- 🎯 Type-aware: Distinguishes between arrays, objects, Maps, Sets, Dates, RegExp, Errors, and more
- 💪 TypeScript support: Fully typed with strict TypeScript configuration
- ⚡ One dependency - Chalk, for terminal colors (a second, Commander, for the CLI only)
- ✅ Strong testing: Has 99.2% test coverage from 764 test cases
npm install kyrieimport { parse_string, paint_ansi } from 'kyrie';
// Parse JSON string to AST
const ast = parse_string('{"name": "Alice", "age": 25}');
// Paint with colors (uses default pastel palette)
const colored = paint_ansi(ast);
console.log(colored); // Outputs colorized JSON to terminalKyrie includes a command-line interface for highlighting JSON and JavaScript files.
# Highlight a file
kyrie myfile.json
# Read from stdin
echo '{"name": "John", "age": 30}' | kyrie
# Use a specific palette
kyrie --palette forest myfile.json
# Use dark theme variant
kyrie --theme dark --palette bold myfile.json
# Set maximum output width
kyrie --max-width 80 myfile.json
# Disable width limiting
kyrie --max-width false myfile.jsonCLI Options:
-p, --palette <name>- Color palette to use (default: "default")-t, --theme <variant>- Theme variant: "light" or "dark" (default: "light")-w, --max-width <width>- Maximum width for output (number or "false" to disable)-o, --output-mode <mode>- Output mode: ansi, html, chrome-console, or logger (default: "ansi")-l, --line-unfolding <mode>- Line unfolding mode: dense or expanded (default: "dense")-i, --indent <value>- Indentation (number or string) (default: 2)-S, --special-characters <mode>- Special characters display mode: hide, show, or showAndDrop (default: "hide")-s, --container-spacing <spacing>- Container spacing inside brackets (non-negative number) (default: 1)-c, --comma-spacing <spacing>- Comma spacing after delimiters (non-negative number) (default: 1)-r, --separator-spacing <spacing>- Separator spacing after separators (non-negative number) (default: 1)-b, --before-separator-spacing <spacing>- Spacing before separators (non-negative number) (default: 0)-a, --lines-after <lines>- Number of blank lines after output (non-negative number) (default: 0)-B, --lines-before <lines>- Number of blank lines before output (non-negative number) (default: 0)-V, --version- Output version number-h, --help- Display help information
The kyrie_default environment variable allows you to configure default CLI behavior without passing command-line options. This is particularly useful for setting persistent preferences across all kyrie invocations.
Usage:
There are two ways to use kyrie_default:
-
As a palette name (simple string without
=):export kyrie_default="forest" kyrie myfile.json # Will use forest palette
-
As configuration options (comma-separated key=value pairs):
export kyrie_default="palette=forest, theme=dark, indent=4" kyrie myfile.json # Will use forest palette with dark theme and 4-space indent
Supported configuration keys:
palette- Color palette name (e.g., "forest", "bold", "pastel")theme- Theme variant: "light" or "dark"maxWidth- Maximum output width (number or "false")outputMode- Output mode: "ansi", "html", "chrome-console", or "logger"lineUnfolding- Line unfolding mode: "dense" or "expanded"indent- Indentation value (number or string like "\t")specialCharacters- Special characters display mode: "hide", "show", or "showAndDrop" (default: "hide")containerSpacing- Spacing inside container brackets (non-negative number, default: 1)commaSpacing- Spacing after commas/delimiters (non-negative number, default: 1)separatorSpacing- Spacing after separators (non-negative number, default: 1)beforeSeparatorSpacing- Spacing before separators (non-negative number, default: 0)linesAfter- Number of blank lines after output (non-negative number, default: 0)linesBefore- Number of blank lines before output (non-negative number, default: 0)- AST node type colors - Override specific colors for any AST node type (see below)
Examples:
# Set a default palette
export kyrie_default="forest"
kyrie data.json
# Configure multiple options
export kyrie_default="palette=bold, theme=dark, lineUnfolding=expanded, indent=2"
kyrie data.json
# Set maximum width
export kyrie_default="palette=pastel, maxWidth=80"
kyrie data.json
# Disable maximum width
export kyrie_default="maxWidth=false"
kyrie data.json
# Set container spacing to 0 (no spaces inside brackets)
export kyrie_default="containerSpacing=0"
kyrie data.json
# Set container spacing to 2 (two spaces inside brackets)
export kyrie_default="containerSpacing=2"
kyrie data.json
# Set comma spacing to 0 (no spaces after commas)
export kyrie_default="commaSpacing=0"
kyrie data.json
# Set separator spacing to 2
export kyrie_default="separatorSpacing=2"
kyrie data.json
# Set before separator spacing to 1
export kyrie_default="beforeSeparatorSpacing=1"
kyrie data.json
# Combine all spacing options
export kyrie_default="containerSpacing=0,commaSpacing=2,separatorSpacing=1,beforeSeparatorSpacing=1"
kyrie data.jsonYou can override specific colors for individual AST node types by specifying them in the kyrie_default environment variable. This allows you to customize colors without creating a full custom palette.
Available AST node types:
text,null,undefined,boolean,number,bigint,specialNumberstring,symbol,function,object,array,map,setweakmap,weakset,date,regexp,error,circularReferencepropertyKey,punctuation,indentGuide
Color value formats:
- Hex colors:
#RGB,#RRGGBB, or#RRGGBBAA(e.g.,#F00,#FF0000,#FF0000FF) - CSS color names:
red,blue,green, etc.
Examples:
# Override specific colors with a base palette
export kyrie_default="palette=forest, number=#FFD700, string=#90EE90"
kyrie data.json
# Override multiple colors
export kyrie_default="palette=bold, theme=dark, number=#FFD700, string=#90EE90, error=#FF6B6B"
kyrie data.json
# Override colors without a base palette (uses default palette with overrides)
export kyrie_default="number=#FF0000, string=#00FF00, boolean=#0000FF"
kyrie data.json
# Use CSS color names
export kyrie_default="palette=pastel, number=gold, string=lightgreen, error=crimson"
kyrie data.json
# Combine with all options
export kyrie_default="palette=forest, theme=dark, number=#FFD700, lineUnfolding=expanded, indent=2"
kyrie data.jsonNote:
- Command-line options will override environment variable settings
- Palette color overrides are applied on top of the selected palette (or default palette if none specified)
- The environment variable configuration is parsed and logged at startup
The paint_ansi() function is the main way to colorize parsed values. It works with both parse_string() (for JSON/JavaScript strings) and parse_value() (for JavaScript values).
import { parse_string, parse_value, paint_ansi, forestPalette } from 'kyrie';
// From JSON string
const ast1 = parse_string('{"name": "John", "age": 30}');
console.log(paint_ansi(ast1));
// From JavaScript value
const ast2 = parse_value({ name: 'John', age: 30 });
console.log(paint_ansi(ast2, { palette: forestPalette }));The highlight_value() function provides a convenient way to directly colorize any JavaScript value without manually calling parse_value() and paint_ansi(). It combines both steps into a single function call.
import { highlight_value } from 'kyrie';
const data = { name: 'John', age: 30 };
const highlighted = highlight_value(data);
console.log(highlighted); // Outputs colorized objectColorizes any JavaScript value by parsing it to an AST and painting it with colors.
Parameters:
value(unknown): The JavaScript value to highlight (any type)options(Options, optional): Configuration options with palette and container settings
Returns:
- string: The colorized string with ANSI escape codes
Example:
import { highlight_value, type Options, forestPalette } from 'kyrie';
const data = { name: 'Alice', age: 25, active: true };
const result = highlight_value(data);
console.log(result); // Uses default pastel palette
// With custom palette
const forestResult = highlight_value(data, { palette: forestPalette });
console.log(forestResult); // Uses forest paletteColorizes a JSON or JavaScript string by parsing it to an AST and painting it with colors.
Parameters:
str(string): The JSON or JavaScript string to highlightoptions(Options, optional): Configuration options with palette and container settings
Returns:
- string: The colorized string with ANSI escape codes
Example:
import { highlight_string, type Options, boldPalette } from 'kyrie';
const json = '{"name": "Alice", "age": 25, "active": true}';
const result = highlight_string(json);
console.log(result); // Uses default pastel palette
// With custom palette
const boldResult = highlight_string(json, { palette: boldPalette });
console.log(boldResult); // Uses bold palette
// Works with arrays too
const array = '[1, 2, 3, "hello", true]';
console.log(highlight_string(array));Console logs a JavaScript value with ANSI colors. Convenience function that combines ansi_from_value() with console.log() for quick debugging and output.
Parameters:
value(unknown): The JavaScript value to log to console (any type)options(Options, optional): Configuration options with palette and container settings
Returns:
- void (outputs directly to console)
Example:
import { log, palettes } from 'kyrie';
const data = { name: 'Alice', age: 25, active: true };
log(data); // Outputs colorized object to console
// With custom palette
log(data, { palette: palettes.bold.dark });
// Works with any value type
log([1, 2, 3, "hello", true]);
log("simple string");
log({ nested: { objects: [1, 2, 3] } });Configuration interface for highlighting and painting functions.
interface Options {
palette?: ColorPalette; // Color scheme to use
containers?: ContainerConfig; // Container delimiter configuration
maxWidth?: number | false | undefined; // Maximum output width (characters)
outputMode?: OutputMode; // Output format mode
lineUnfolding?: LineUnfolding; // Line formatting mode
indent?: number | string; // Indentation value
specialNumberPaintMode?: SpecialNumberPaintMode; // Special number rendering mode
specialCharacters?: SpecialCharacters; // Special characters display mode
containerSpacing?: number; // Spacing inside container brackets
commaSpacing?: number; // Spacing after commas/delimiters
separatorSpacing?: number; // Spacing after separators
beforeSeparatorSpacing?: number; // Spacing before separators
linesAfter?: number; // Number of blank lines after output
linesBefore?: number; // Number of blank lines before output
}Properties:
palette- Color scheme to use for syntax highlightingcontainers- Container delimiter configuration for formattingmaxWidth- Maximum width for output in charactersnumber- Specific maximum width (e.g.,80for 80 characters)false- Explicitly disable width limitingundefined- Use default behavior (no width limit)
outputMode- Output format: "ansi", "html", "chrome-console", or "logger"lineUnfolding- Line formatting: "dense" (single line) or "expanded" (multi-line with indentation)indent- Indentation for expanded mode (number of spaces or string like "\t")specialNumberPaintMode- How special numbers are rendered: "normal", "highlight", "label", or "highlight-label"specialCharacters- How special/control characters in strings are displayed (default: "hide")- Special characters currently recognized:
\r(carriage return),\n(newline),\t(tab),\v(vertical tab) "hide"- Display special characters as-is (default behavior, shows actual newlines/tabs)"show"- Display special characters as escape sequences (e.g.,\ninstead of actual newline)"showAndDrop"- Display both the escape sequence and the literal character (e.g.,\nfollowed by actual newline)- Escape sequences are colored using the
specialCharacterpalette color
- Special characters currently recognized:
containerSpacing- Number of spaces inside container brackets (default: 1). Must be non-negative.0- No spacing:[1,2,3],{a:1}1- Single space (default):[ 1,2,3 ],{ a:1 }2- Double spacing:[ 1,2,3 ],{ a:1 }
commaSpacing- Number of spaces after commas/delimiters (default: 1). Must be non-negative.0- No spacing:[1,2,3],{a:1,b:2}1- Single space (default):[1, 2, 3],{a:1, b:2}2- Double spacing:[1, 2, 3],{a:1, b:2}
separatorSpacing- Number of spaces after separators (default: 1). Must be non-negative.0- No spacing:{a:1},{<a:1>}1- Single space (default):{a: 1},{<a: 1>}2- Double spacing:{a: 1},{<a: 1>}
beforeSeparatorSpacing- Number of spaces before separators (default: 0). Must be non-negative.0- No spacing (default):{a:1},{<a:1>}1- Single space:{a :1},{<a :1>}2- Double spacing:{a :1},{<a :1>}
linesAfter- Number of blank lines after output (default: 0). Must be non-negative.0- No blank lines (default)1- One blank line2- Two blank lines
linesBefore- Number of blank lines before output (default: 0). Must be non-negative.0- No blank lines (default)1- One blank line2- Two blank lines
Available exports:
defaultOptions- Pre-configured with defaultPalette and defaultContainersdefaultPalette,forestPalette,boldPalette,duskPalette- Built-in color schemesdefaultContainers- Default container delimiters
Kyrie provides three paint functions for different output formats:
paint_ansi()- ANSI escape codes for terminal display (using Chalk)paint_html()- HTML with inline CSS for web browserspaint_log()- Plain text for logging and environments without color support
Renders AST nodes with colors and formatting using Chalk. Converts parsed AST nodes into colorized strings with ANSI escape codes for terminal display. Colors are always generated regardless of environment (forced color support at 16 million color level).
Converts an AST node into a colorized string representation.
Parameters:
node(ASTNode): The AST node to paintoptions(Options, optional): Configuration with palette and container settings. Defaults are used for any missing values.
Returns:
- string: The colorized string representation with ANSI escape codes (24-bit RGB colors)
Example: Basic usage (using defaults)
import { parse_string, paint_ansi } from 'kyrie';
const ast = parse_string('{"name": "Alice", "age": 25}');
const colored = paint_ansi(ast);
console.log(colored);
// Outputs: {"name": "Alice", "age": 25} with colorsExample: Using different palettes
import { parse_string, paint_ansi, forestPalette, boldPalette, duskPalette } from 'kyrie';
const ast = parse_string('[1, 2, 3, "hello", true, null]');
// Forest theme
console.log(paint_ansi(ast, { palette: forestPalette }));
// Bold vibrant colors
console.log(paint_ansi(ast, { palette: boldPalette }));
// Dark theme (near-black colors)
console.log(paint_ansi(ast, { palette: duskPalette }));Example: Custom containers with default palette
import { parse_string, paint_ansi, type ContainerConfig } from 'kyrie';
const customContainers: ContainerConfig = {
array: { start: '<<', delimiter: '|', end: '>>' },
object: { start: 'obj{', separator: ' => ', delimiter: '; ', end: '}' }
};
const ast = parse_string('{"items": [1, 2, 3]}');
const colored = paint_ansi(ast, { containers: customContainers });
console.log(colored);
// Outputs: obj{items => <<1| 2| 3>>} with colorsExample: Painting JavaScript values directly
import { parse_value, paint_ansi } from 'kyrie';
// Parse and paint any JavaScript value
const obj = { users: ['Alice', 'Bob'], count: 2 };
const ast = parse_value(obj);
const colored = paint_ansi(ast);
console.log(colored);Note: The paint_ansi function uses Chalk with forced color support (level 3 - 16 million colors). This ensures ANSI color codes are always generated in the output, regardless of the environment. When displayed in a color-supporting terminal, you'll see the fully colorized output.
Converts an AST node into an HTML-formatted string with inline CSS color styling. Perfect for web browser output.
Parameters:
node(ASTNode): The AST node to paintoptions(Options, optional): Configuration with palette and container settings
Returns:
- string: HTML string with
<span>tags and inline CSS styles
Example:
import { parse_value, paint_html } from 'kyrie';
const data = { name: "Alice", score: 95 };
const ast = parse_value(data);
const html = paint_html(ast);
document.body.innerHTML = `<pre>${html}</pre>`;
// Renders colorized JSON in browserConverts an AST node into plain text without any color formatting. Ideal for logging to files, databases, or environments without color support.
Parameters:
node(ASTNode): The AST node to paintoptions(Options, optional): Configuration with container settings (palette is ignored)
Returns:
- string: Plain text representation without any formatting codes
Example:
import { parse_value, paint_log } from 'kyrie';
import fs from 'fs';
const logData = { level: "error", message: "Failed to connect", code: 500 };
const ast = parse_value(logData);
const plainText = paint_log(ast);
// Write to log file without ANSI codes
fs.appendFileSync('app.log', plainText + '\n');
// Or log to console as plain text
console.log(plainText);
// Outputs: {level: "error", message: "Failed to connect", code: 500}Kyrie allows customization of how different data structures are delimited when painted.
interface ContainerDelimiters {
start?: string; // Opening delimiter
separator?: string; // Key-value separator (for objects/maps)
delimiter?: string; // Element delimiter (comma for arrays)
end?: string; // Closing delimiter
}export const defaultContainers: ContainerConfig = {
array: { start: '[', delimiter: ',', end: ']' },
object: { start: '{', separator: ':', delimiter: ',', end: '}' },
map: { start: '{<', separator: ':', delimiter: ',', end: '>}' },
set: { start: '{(', delimiter: ',', end: ')}' },
weakmap: { start: '(<', separator: ':', delimiter: ',', end: '>)' },
weakset: { start: '((', delimiter: ',', end: '))' },
date: { start: 'Date(', end: ')' },
regexp: { start: '/', end: '/' },
error: { start: 'Error(', end: ')' },
function: { start: 'function(', end: ')' }
};Example: Custom container delimiters
import { parse_string, paint_ansi, defaultPalette, type ContainerConfig } from 'kyrie';
const customContainers: ContainerConfig = {
array: {
start: '<<',
delimiter: '|',
end: '>>'
},
object: {
start: 'obj{',
separator: ' => ',
delimiter: '; ',
end: '}'
}
};
const ast = parse_string('[1, 2, 3]');
const options = {
palette: defaultPalette,
containers: customContainers
};
const result = paint_ansi(ast, options);
console.log(result); // Outputs: <<1| 2| 3>>Kyrie provides a ColorPalette interface and several built-in color schemes for syntax highlighting.
interface ColorPalette {
null: string;
undefined: string;
boolean: string;
number: string;
string: string;
symbol: string;
function: string;
object: string;
array: string;
map: string;
set: string;
weakmap: string;
weakset: string;
date: string;
regexp: string;
error: string;
circularReference: string;
propertyKey: string;
punctuation: string;
}Kyrie includes four pre-configured color palettes:
defaultPalette - Modern pastel colors with soft, light tones
import { defaultPalette } from 'kyrie';
console.log(defaultPalette.string); // '#C1E1C1'forestPalette - Earth tones and natural greens
import { forestPalette } from 'kyrie';
console.log(forestPalette.string); // '#5F7A61'boldPalette - Vibrant, saturated colors
import { boldPalette } from 'kyrie';
console.log(boldPalette.string); // '#2ECC71'duskPalette - Dark colors near black for dark themes
import { duskPalette } from 'kyrie';
console.log(duskPalette.string); // '#1F2B1F'Example: Creating a custom palette
import { type ColorPalette } from 'kyrie';
const myPalette: ColorPalette = {
null: '#808080',
undefined: '#A0A0A0',
boolean: '#4A90E2',
number: '#F39C12',
string: '#27AE60',
symbol: '#9B59B6',
function: '#E67E22',
object: '#E74C3C',
array: '#3498DB',
map: '#1ABC9C',
set: '#16A085',
weakmap: '#D35400',
weakset: '#C0392B',
date: '#F1C40F',
regexp: '#8E44AD',
error: '#E74C3C',
circularReference: '#95A5A6',
propertyKey: '#2C3E50',
punctuation: '#7F8C8D'
};The parse_string() function parses a JSON or JavaScript value string into an Abstract Syntax Tree (AST) with detailed type information.
import { parse_string } from 'kyrie';
const ast = parse_string('{"name": "John", "age": 30}');
console.log(ast.basic_type); // "object"
console.log(ast.deep_type.constructorName); // "Object"
console.log(ast.properties.name.value); // "John"Parses a JavaScript or JSON value string into an AST. Does not use JSON.parse, allowing for future extensions to handle non-JSON JavaScript types.
Parameters:
input(unknown): The string to parse (must be a string type)
Returns:
- ASTNode: An AST representation with type information
Features:
- Type tracking: Each node has
basic_type(fromtypeof) anddeep_type(detailed type info) - Cycle detection: Uses WeakMap to track and identify circular references
- Reference IDs: Each object is assigned a unique reference ID for tracking
- Rich type info: Identifies arrays, Maps, Sets, WeakMaps, WeakSets, Dates, RegExp, Errors, and more
Example:
import { parse_string, type ASTNode } from 'kyrie';
// Parse primitives
const num = parse_string('42');
console.log(num.basic_type); // "number"
console.log(num.value); // 42
// Parse arrays
const arr = parse_string('[1, 2, 3]');
console.log(arr.basic_type); // "object"
console.log(arr.deep_type.isArray); // true
console.log(arr.elements[0].value); // 1
// Parse objects
const obj = parse_string('{"name": "Alice", "age": 25}');
console.log(obj.properties.name.value); // "Alice"
console.log(obj.deep_type.referenceId); // 0
// Parse nested structures
const nested = parse_string('{"users": [{"name": "John"}]}');
console.log(nested.properties.users.deep_type.isArray); // trueParses JavaScript values directly into an AST. Accepts any JavaScript value and returns the same AST structure that parse_string would produce for an equivalent string representation.
Parameters:
input(unknown): The value to parse (any JavaScript type)
Returns:
- ASTNode: An AST representation with type information
Features:
- Direct value parsing: Works with actual JavaScript values, not just strings
- All types supported: Handles primitives, objects, arrays, symbols, functions, and more
- Type tracking: Each node has
basic_type(fromtypeof) anddeep_type(detailed type info) - Cycle detection: Uses WeakMap to track and identify circular references
- Reference IDs: Each object is assigned a unique reference ID for tracking
- Rich type info: Identifies arrays, Maps, Sets, WeakMaps, WeakSets, Dates, RegExp, Errors, and more
- Consistent output: Produces the same AST structure as
parse_stringfor equivalent values
Example:
import { parse_value, type ASTNode } from 'kyrie';
// Parse primitives
const num = parse_value(42);
console.log(num.basic_type); // "number"
console.log(num.value); // 42
// Parse arrays
const arr = parse_value([1, 2, 3]);
console.log(arr.basic_type); // "object"
console.log(arr.deep_type.isArray); // true
console.log(arr.elements[0].value); // 1
// Parse objects
const obj = parse_value({name: 'Alice', age: 25});
console.log(obj.properties.name.value); // "Alice"
console.log(obj.deep_type.referenceId); // 0
// Parse special types
const sym = Symbol('test');
const symAst = parse_value(sym);
console.log(symAst.basic_type); // "symbol"
console.log(symAst.deep_type.description); // "test"
// Detect circular references
const circular: any = {a: 1};
circular.self = circular;
const circAst = parse_value(circular);
console.log(circAst.properties.self.deep_type.isCircularReference); // true
// Works with Date, RegExp, Map, Set, etc.
const date = parse_value(new Date('2024-01-01'));
console.log(date.deep_type.isDate); // trueComparison with parse_string:
// These produce equivalent AST structures:
const fromString = parse_string('{"name": "John", "age": 30}');
const fromValue = parse_value({name: 'John', age: 30});
console.log(fromString.basic_type === fromValue.basic_type); // true
console.log(fromString.properties.name.value === fromValue.properties.name.value); // trueinterface ASTNode {
basic_type: string; // Result of typeof operator
deep_type: DeepType; // Detailed type information
value?: unknown; // For primitives
properties?: Record<string, ASTNode>; // For objects
elements?: ASTNode[]; // For arrays
}interface DeepType {
constructorName?: string; // Constructor name (e.g., "Object", "Array")
description?: string; // For symbols
isArray?: boolean; // True for arrays
isWeakMap?: boolean; // True for WeakMaps
isWeakSet?: boolean; // True for WeakSets
isMap?: boolean; // True for Maps
isSet?: boolean; // True for Sets
isDate?: boolean; // True for Dates
isRegExp?: boolean; // True for RegExp
isError?: boolean; // True for Errors
referenceId?: number; // Unique ID for this object
isCircularReference?: boolean; // True if this is a circular reference
}Kyrie exports a comprehensive testdata object containing examples of every AST node type. This is useful for testing, demonstrations, and understanding the library's capabilities.
The testdata object includes:
Primitives:
null,undefined- Booleans:
boolean_true,boolean_false - Numbers:
number_integer,number_negative,number_float,number_scientific,number_zero - Strings:
string,string_empty,string_escaped - Symbols:
symbol_with_description,symbol_without_description - Function:
function
Simple Containers with All Primitives:
array_all_primitives- Array containing all non-container typesarray_with_holes- Sparse array with missing indicesobject_all_primitives- Object with all non-container types as propertiesmap_all_primitives- Map with all non-container typesset_all_primitives- Set with primitive values
Special Types:
date- Date instanceregexp_with_flags,regexp_simple- RegExp instanceserror- Error instanceweakmap- WeakMap instanceweakset- WeakSet instance
Nested Containers:
array_all_containers- Array containing all container typesobject_all_containers- Object containing all container typesmap_all_containers- Map containing all container typesset_all_containers- Set containing all container types
Special Cases:
deeply_nested- Multi-level nested structurecircular- Object with circular self-reference
Example Usage:
import { testdata, parse_value, paint_ansi } from 'kyrie';
// Parse and paint any testdata item
const ast = parse_value(testdata.array_all_primitives);
console.log(paint_ansi(ast));
// Test with nested containers
const nestedAst = parse_value(testdata.object_all_containers);
console.log(paint_ansi(nestedAst, { palette: forestPalette }));
// Verify circular reference detection
const circularAst = parse_value(testdata.circular);
console.log(circularAst.properties.self.deep_type.isCircularReference); // trueKyrie includes 120 themed palettes, each with light and dark variants:
-
default - Balanced, standard colors suitable for general use
palettes.default.light- Dark colors for light backgroundspalettes.default.dark- Light colors for dark backgrounds
-
pastel - Soft, muted colors with gentle tones
palettes.pastel.light- Dark pastels for light backgroundspalettes.pastel.dark- Light pastels for dark backgrounds
-
garden - Greens and earth tones inspired by nature
palettes.garden.light- Dark garden colors for light backgroundspalettes.garden.dark- Light garden colors for dark backgrounds
-
forest - Deeper greens and browns with rich, natural hues
palettes.forest.light- Dark forest colors for light backgroundspalettes.forest.dark- Light forest colors for dark backgrounds
-
bold - Vibrant, saturated colors with high contrast
palettes.bold.light- Dark bold colors for light backgroundspalettes.bold.dark- Light bold colors for dark backgrounds
-
dusk - Purples and twilight colors for a moody atmosphere
palettes.dusk.light- Dark dusk colors for light backgroundspalettes.dusk.dark- Light dusk colors for dark backgrounds
-
lightPastel - Very light, delicate colors with soft contrast
palettes.lightPastel.light- Muted light pastels for light backgroundspalettes.lightPastel.dark- Bright light pastels for dark backgrounds
-
funky - Unusual, bright, varied colors for a playful look
palettes.funky.light- Dark funky colors for light backgroundspalettes.funky.dark- Light funky colors for dark backgrounds
-
boring - Muted, low-saturation grays and subdued colors
palettes.boring.light- Dark grays for light backgroundspalettes.boring.dark- Light grays for dark backgrounds
-
mobster - Film noir and gangster-inspired dark tones
palettes.mobster.light- Dark noir colors for light backgroundspalettes.mobster.dark- Light silver/gray tones for dark backgrounds
-
money - Currency-inspired greens and golds
palettes.money.light- Dark money greens for light backgroundspalettes.money.dark- Light gold and green tones for dark backgrounds
-
skeleton - Bone whites and grays with ghostly tones
palettes.skeleton.light- Dark bone colors for light backgroundspalettes.skeleton.dark- Light bone whites for dark backgrounds
-
sinister - Dark and ominous color scheme
palettes.sinister.light- Very dark sinister tones for light backgroundspalettes.sinister.dark- Muted threatening colors for dark backgrounds
-
halloween - Orange, purple, black, and green seasonal colors
palettes.halloween.light- Dark Halloween colors for light backgroundspalettes.halloween.dark- Bright Halloween colors for dark backgrounds
-
vampire - Blood reds, blacks, and pale gothic colors
palettes.vampire.light- Very dark vampiric tones for light backgroundspalettes.vampire.dark- Pale and blood-red colors for dark backgrounds
-
grayscale - Pure grayscale with no color saturation
palettes.grayscale.light- Dark grays for light backgroundspalettes.grayscale.dark- Light grays for dark backgrounds
-
blues - Various shades of blue throughout
palettes.blues.light- Dark blues for light backgroundspalettes.blues.dark- Light sky and ocean blues for dark backgrounds
-
circus - Bright festive reds, yellows, and primary colors
palettes.circus.light- Saturated circus colors for light backgroundspalettes.circus.dark- Bright carnival colors for dark backgrounds
-
monkey - Browns, tans, and jungle-inspired earth tones
palettes.monkey.light- Dark brown and tan for light backgroundspalettes.monkey.dark- Light brown and cream tones for dark backgrounds
-
sky - Sky blues with sun yellows and cloud whites
palettes.sky.light- Dark sky blues for light backgroundspalettes.sky.dark- Bright sky and sun colors for dark backgrounds
-
protanopia - Red color blindness (no red perception, uses blues and yellows)
palettes.protanopia.light- Dark blues and yellows for light backgroundspalettes.protanopia.dark- Light blues and yellows for dark backgrounds
-
deuteranopia - Green color blindness (no green perception, uses blues and yellows)
palettes.deuteranopia.light- Dark blues and yellows for light backgroundspalettes.deuteranopia.dark- Light blues and yellows for dark backgrounds
-
tritanopia - Blue color blindness (no blue perception, uses reds, greens, and yellows)
palettes.tritanopia.light- Dark warm colors for light backgroundspalettes.tritanopia.dark- Light warm colors for dark backgrounds
-
monochromacy - Complete color blindness (grayscale only, distinct brightness levels)
palettes.monochromacy.light- Dark grays with varied brightness for light backgroundspalettes.monochromacy.dark- Light grays with varied brightness for dark backgrounds
-
deuteranomaly - Weak green perception (reduced greens, emphasizes blues and yellows)
palettes.deuteranomaly.light- Dark blues and yellows for light backgroundspalettes.deuteranomaly.dark- Light blues and yellows for dark backgrounds
-
protanomaly - Weak red perception (reduced reds, emphasizes blues and yellows)
palettes.protanomaly.light- Dark blues and yellows for light backgroundspalettes.protanomaly.dark- Light blues and yellows for dark backgrounds
-
tritanomaly - Weak blue perception (reduced blues, emphasizes reds and greens)
palettes.tritanomaly.light- Dark warm colors for light backgroundspalettes.tritanomaly.dark- Light warm colors for dark backgrounds
-
achromatopsia - Rod monochromacy (complete absence of cone function, grayscale only)
palettes.achromatopsia.light- Dark grays with varied brightness for light backgroundspalettes.achromatopsia.dark- Light grays with varied brightness for dark backgrounds
-
rainbow - Vibrant spectrum of colors across the rainbow
palettes.rainbow.light- Dark rainbow colors for light backgroundspalettes.rainbow.dark- Bright rainbow colors for dark backgrounds
-
mutedRainbow - Softer, desaturated rainbow spectrum
palettes.mutedRainbow.light- Dark muted rainbow for light backgroundspalettes.mutedRainbow.dark- Light muted rainbow for dark backgrounds
-
sunflower - Warm yellows and browns inspired by sunflowers
palettes.sunflower.light- Dark gold and brown for light backgroundspalettes.sunflower.dark- Bright yellow and warm tones for dark backgrounds
-
strawberry - Reds, pinks, and berry-inspired colors
palettes.strawberry.light- Dark berry reds for light backgroundspalettes.strawberry.dark- Light pink and red tones for dark backgrounds
-
brownAndGreen - Earth tones combining browns and greens
palettes.brownAndGreen.light- Dark brown and green for light backgroundspalettes.brownAndGreen.dark- Light tan and sage for dark backgrounds
-
solarFlare - Intense oranges, yellows, and hot colors
palettes.solarFlare.light- Dark solar colors for light backgroundspalettes.solarFlare.dark- Bright solar yellows and oranges for dark backgrounds
-
purpleToOrange - Gradient from purple through red to orange
palettes.purpleToOrange.light- Dark gradient colors for light backgroundspalettes.purpleToOrange.dark- Bright gradient colors for dark backgrounds
-
commodore64 - Retro computer palette inspired by the Commodore 64
palettes.commodore64.light- Dark C64 colors for light backgroundspalettes.commodore64.dark- Bright C64 colors for dark backgrounds
-
military - Olive greens, khakis, and camouflage-inspired earth tones
palettes.military.light- Dark military colors for light backgroundspalettes.military.dark- Light olive and khaki for dark backgrounds
-
police - Blues and blacks with emergency light accents
palettes.police.light- Dark police blues for light backgroundspalettes.police.dark- Light blue and white tones for dark backgrounds
-
hacker - Matrix-inspired greens and terminal colors
palettes.hacker.light- Dark terminal greens for light backgroundspalettes.hacker.dark- Bright matrix greens for dark backgrounds
-
wizard - Mystical purples, blues, and magical tones
palettes.wizard.light- Dark mystical colors for light backgroundspalettes.wizard.dark- Bright magical purples and blues for dark backgrounds
-
butterfly - Delicate, varied colors inspired by butterfly wings
palettes.butterfly.light- Dark wing colors for light backgroundspalettes.butterfly.dark- Bright vibrant wing colors for dark backgrounds
-
gunmetal - Dark grays and metallic tones
palettes.gunmetal.light- Very dark metallic grays for light backgroundspalettes.gunmetal.dark- Light metallic tones for dark backgrounds
-
cocaCola - Classic red and white brand colors
palettes.cocaCola.light- Dark Coca-Cola reds for light backgroundspalettes.cocaCola.dark- Bright reds and whites for dark backgrounds
-
ogre - Swamp greens and muddy browns
palettes.ogre.light- Dark swamp colors for light backgroundspalettes.ogre.dark- Light moss and mud tones for dark backgrounds
-
burglar - Black, gray stripes, and stealth colors
palettes.burglar.light- Very dark grays and blacks for light backgroundspalettes.burglar.dark- Light grays for dark backgrounds
-
crystal - Clear, icy blues and whites with gem-like tones
palettes.crystal.light- Dark crystal blues for light backgroundspalettes.crystal.dark- Bright icy and white tones for dark backgrounds
-
laser - Neon reds, pinks, and bright sci-fi colors
palettes.laser.light- Dark laser colors for light backgroundspalettes.laser.dark- Bright neon laser colors for dark backgrounds
-
kungFu - Martial arts-inspired oranges, golds, and reds
palettes.kungFu.light- Dark martial arts colors for light backgroundspalettes.kungFu.dark- Bright gold and red tones for dark backgrounds
-
starTrek - Starfleet command gold, science blue, and engineering red
palettes.starTrek.light- Dark Trek colors for light backgroundspalettes.starTrek.dark- Bright Starfleet colors for dark backgrounds
-
antique - Aged browns, sepias, and vintage tones
palettes.antique.light- Dark sepia and brown for light backgroundspalettes.antique.dark- Light aged cream and tan for dark backgrounds
-
book - Paper whites, ink blacks, and library colors
palettes.book.light- Dark ink colors for light backgroundspalettes.book.dark- Light cream and aged paper for dark backgrounds
-
eighties - Neon pinks, purples, and retro 1980s colors
palettes.eighties.light- Dark 80s colors for light backgroundspalettes.eighties.dark- Bright neon 80s colors for dark backgrounds
-
neon - Ultra-bright neon colors for signs and displays
palettes.neon.light- Dark neon base colors for light backgroundspalettes.neon.dark- Bright glowing neon for dark backgrounds
-
flowers - Colorful floral-inspired palette with varied hues
palettes.flowers.light- Dark floral colors for light backgroundspalettes.flowers.dark- Bright petal colors for dark backgrounds
-
logger - Wood browns, bark grays, and forest work colors
palettes.logger.light- Dark wood and bark for light backgroundspalettes.logger.dark- Light lumber and sawdust tones for dark backgrounds
-
system - Terminal grays, tech blues, and computer interface colors
palettes.system.light- Dark system colors for light backgroundspalettes.system.dark- Light terminal colors for dark backgrounds
-
alien - Otherworldly greens, purples, and sci-fi extraterrestrial colors
palettes.alien.light- Dark alien colors for light backgroundspalettes.alien.dark- Bright UFO and alien greens for dark backgrounds
-
protanopiaBright - Red color blindness with bright, saturated blues and yellows (no reds)
palettes.protanopiaBright.light- Dark bright blues and yellows for light backgroundspalettes.protanopiaBright.dark- Bright vibrant blues and yellows for dark backgrounds
-
protanopiaSubtle - Red color blindness with muted, low-saturation blues and yellows (no reds)
palettes.protanopiaSubtle.light- Dark muted blues and yellows for light backgroundspalettes.protanopiaSubtle.dark- Light muted blues and yellows for dark backgrounds
-
protanopiaPastel - Red color blindness with soft, pastel blues and yellows (no reds)
palettes.protanopiaPastel.light- Dark pastel blues and yellows for light backgroundspalettes.protanopiaPastel.dark- Light pastel blues and yellows for dark backgrounds
-
protanopiaBoring - Red color blindness with grayscale-ish, very muted tones (no reds)
palettes.protanopiaBoring.light- Dark grayscale blues and yellows for light backgroundspalettes.protanopiaBoring.dark- Light grayscale blues and yellows for dark backgrounds
-
protanopiaFunky - Red color blindness with playful, unusual blues and yellows (no reds)
palettes.protanopiaFunky.light- Dark funky blues and yellows for light backgroundspalettes.protanopiaFunky.dark- Bright playful blues and yellows for dark backgrounds
-
protanopiaVivid - Red color blindness with intense, highly saturated blues and yellows (no reds)
palettes.protanopiaVivid.light- Very dark vivid blues and yellows for light backgroundspalettes.protanopiaVivid.dark- Very bright vivid blues and yellows for dark backgrounds
-
deuteranopiaBright - Green color blindness with bright, saturated blues and yellows (no greens)
palettes.deuteranopiaBright.light- Dark bright blues and yellows for light backgroundspalettes.deuteranopiaBright.dark- Bright vibrant blues and yellows for dark backgrounds
-
deuteranopiaSubtle - Green color blindness with muted, low-saturation blues and yellows (no greens)
palettes.deuteranopiaSubtle.light- Dark muted blues and yellows for light backgroundspalettes.deuteranopiaSubtle.dark- Light muted blues and yellows for dark backgrounds
-
deuteranopiaPastel - Green color blindness with soft, pastel blues and yellows (no greens)
palettes.deuteranopiaPastel.light- Dark pastel blues and yellows for light backgroundspalettes.deuteranopiaPastel.dark- Light pastel blues and yellows for dark backgrounds
-
deuteranopiaBoring - Green color blindness with grayscale-ish, very muted tones (no greens)
palettes.deuteranopiaBoring.light- Dark grayscale blues and yellows for light backgroundspalettes.deuteranopiaBoring.dark- Light grayscale blues and yellows for dark backgrounds
-
deuteranopiaFunky - Green color blindness with playful, unusual blues and yellows (no greens)
palettes.deuteranopiaFunky.light- Dark funky blues and yellows for light backgroundspalettes.deuteranopiaFunky.dark- Bright playful blues and yellows for dark backgrounds
-
deuteranopiaVivid - Green color blindness with intense, highly saturated blues and yellows (no greens)
palettes.deuteranopiaVivid.light- Very dark vivid blues and yellows for light backgroundspalettes.deuteranopiaVivid.dark- Very bright vivid blues and yellows for dark backgrounds
-
tritanopiaBright - Blue color blindness with bright, saturated reds, greens, and yellows (no blues)
palettes.tritanopiaBright.light- Dark bright warm colors for light backgroundspalettes.tritanopiaBright.dark- Bright vibrant warm colors for dark backgrounds
-
tritanopiaSubtle - Blue color blindness with muted, low-saturation reds, greens, and yellows (no blues)
palettes.tritanopiaSubtle.light- Dark muted warm colors for light backgroundspalettes.tritanopiaSubtle.dark- Light muted warm colors for dark backgrounds
-
tritanopiaPastel - Blue color blindness with soft, pastel reds, greens, and yellows (no blues)
palettes.tritanopiaPastel.light- Dark pastel warm colors for light backgroundspalettes.tritanopiaPastel.dark- Light pastel warm colors for dark backgrounds
-
tritanopiaBoring - Blue color blindness with grayscale-ish, very muted warm tones (no blues)
palettes.tritanopiaBoring.light- Dark grayscale warm colors for light backgroundspalettes.tritanopiaBoring.dark- Light grayscale warm colors for dark backgrounds
-
tritanopiaFunky - Blue color blindness with playful, unusual reds, greens, and yellows (no blues)
palettes.tritanopiaFunky.light- Dark funky warm colors for light backgroundspalettes.tritanopiaFunky.dark- Bright playful warm colors for dark backgrounds
-
tritanopiaVivid - Blue color blindness with intense, highly saturated reds, greens, and yellows (no blues)
palettes.tritanopiaVivid.light- Very dark vivid warm colors for light backgroundspalettes.tritanopiaVivid.dark- Very bright vivid warm colors for dark backgrounds
-
monochromacyBright - Complete color blindness with bright, high-contrast grayscale (no colors, only grays)
palettes.monochromacyBright.light- Very dark grays with strong brightness contrast for light backgroundspalettes.monochromacyBright.dark- Very light grays with strong brightness contrast for dark backgrounds
-
monochromacySubtle - Complete color blindness with subtle, moderate grayscale contrast (no colors, only grays)
palettes.monochromacySubtle.light- Dark grays with moderate brightness levels for light backgroundspalettes.monochromacySubtle.dark- Light grays with moderate brightness levels for dark backgrounds
-
monochromacyPastel - Complete color blindness with soft, light grayscale tones (no colors, only grays)
palettes.monochromacyPastel.light- Medium-dark grays with subtle contrast for light backgroundspalettes.monochromacyPastel.dark- Very light grays with subtle contrast for dark backgrounds
-
monochromacyBoring - Complete color blindness with minimal, low-contrast grayscale (no colors, only grays)
palettes.monochromacyBoring.light- Dark grays with minimal brightness variation for light backgroundspalettes.monochromacyBoring.dark- Light grays with minimal brightness variation for dark backgrounds
-
monochromacyFunky - Complete color blindness with varied, distinct grayscale levels (no colors, only grays)
palettes.monochromacyFunky.light- Very dark to black grays with high variation for light backgroundspalettes.monochromacyFunky.dark- Very light to white grays with high variation for dark backgrounds
-
monochromacyVivid - Complete color blindness with extreme, maximum-contrast grayscale (no colors, only grays)
palettes.monochromacyVivid.light- Pure blacks and very dark grays for light backgroundspalettes.monochromacyVivid.dark- Pure whites and very light grays for dark backgrounds
-
deuteranomalyBright - Weak green perception with bright, saturated blues and yellows (reduced greens)
palettes.deuteranomalyBright.light- Dark bright blues and yellows for light backgroundspalettes.deuteranomalyBright.dark- Bright vibrant blues and yellows for dark backgrounds
-
deuteranomalySubtle - Weak green perception with muted, low-saturation blues and yellows (reduced greens)
palettes.deuteranomalySubtle.light- Dark muted blues and yellows for light backgroundspalettes.deuteranomalySubtle.dark- Light muted blues and yellows for dark backgrounds
-
deuteranomalyPastel - Weak green perception with soft, pastel blues and yellows (reduced greens)
palettes.deuteranomalyPastel.light- Dark pastel blues and yellows for light backgroundspalettes.deuteranomalyPastel.dark- Light pastel blues and yellows for dark backgrounds
-
deuteranomalyBoring - Weak green perception with grayscale-ish, very muted tones (reduced greens)
palettes.deuteranomalyBoring.light- Dark grayscale blues and yellows for light backgroundspalettes.deuteranomalyBoring.dark- Light grayscale blues and yellows for dark backgrounds
-
deuteranomalyFunky - Weak green perception with playful, unusual blues and yellows (reduced greens)
palettes.deuteranomalyFunky.light- Dark funky blues and yellows for light backgroundspalettes.deuteranomalyFunky.dark- Bright playful blues and yellows for dark backgrounds
-
deuteranomalyVivid - Weak green perception with intense, highly saturated blues and yellows (reduced greens)
palettes.deuteranomalyVivid.light- Very dark vivid blues and yellows for light backgroundspalettes.deuteranomalyVivid.dark- Very bright vivid blues and yellows for dark backgrounds
-
protanomalyBright - Weak red perception with bright, saturated blues and yellows (reduced reds)
palettes.protanomalyBright.light- Dark bright blues and yellows for light backgroundspalettes.protanomalyBright.dark- Bright vibrant blues and yellows for dark backgrounds
-
protanomalySubtle - Weak red perception with muted, low-saturation blues and yellows (reduced reds)
palettes.protanomalySubtle.light- Dark muted blues and yellows for light backgroundspalettes.protanomalySubtle.dark- Light muted blues and yellows for dark backgrounds
-
protanomalyPastel - Weak red perception with soft, pastel blues and yellows (reduced reds)
palettes.protanomalyPastel.light- Dark pastel blues and yellows for light backgroundspalettes.protanomalyPastel.dark- Light pastel blues and yellows for dark backgrounds
-
protanomalyBoring - Weak red perception with grayscale-ish, very muted tones (reduced reds)
palettes.protanomalyBoring.light- Dark grayscale blues and yellows for light backgroundspalettes.protanomalyBoring.dark- Light grayscale blues and yellows for dark backgrounds
-
protanomalyFunky - Weak red perception with playful, unusual blues and yellows (reduced reds)
palettes.protanomalyFunky.light- Dark funky blues and yellows for light backgroundspalettes.protanomalyFunky.dark- Bright playful blues and yellows for dark backgrounds
-
protanomalyVivid - Weak red perception with intense, highly saturated blues and yellows (reduced reds)
palettes.protanomalyVivid.light- Very dark vivid blues and yellows for light backgroundspalettes.protanomalyVivid.dark- Very bright vivid blues and yellows for dark backgrounds
-
tritanomalyBright - Weak blue perception with bright, saturated reds, greens, and yellows (reduced blues)
palettes.tritanomalyBright.light- Dark bright warm colors for light backgroundspalettes.tritanomalyBright.dark- Bright vibrant warm colors for dark backgrounds
-
tritanomalySubtle - Weak blue perception with muted, low-saturation reds, greens, and yellows (reduced blues)
palettes.tritanomalySubtle.light- Dark muted warm colors for light backgroundspalettes.tritanomalySubtle.dark- Light muted warm colors for dark backgrounds
-
tritanomalyPastel - Weak blue perception with soft, pastel reds, greens, and yellows (reduced blues)
palettes.tritanomalyPastel.light- Dark pastel warm colors for light backgroundspalettes.tritanomalyPastel.dark- Light pastel warm colors for dark backgrounds
-
tritanomalyBoring - Weak blue perception with grayscale-ish, very muted warm tones (reduced blues)
palettes.tritanomalyBoring.light- Dark grayscale warm colors for light backgroundspalettes.tritanomalyBoring.dark- Light grayscale warm colors for dark backgrounds
-
tritanomalyFunky - Weak blue perception with playful, unusual reds, greens, and yellows (reduced blues)
palettes.tritanomalyFunky.light- Dark funky warm colors for light backgroundspalettes.tritanomalyFunky.dark- Bright playful warm colors for dark backgrounds
-
tritanomalyVivid - Weak blue perception with intense, highly saturated reds, greens, and yellows (reduced blues)
palettes.tritanomalyVivid.light- Very dark vivid warm colors for light backgroundspalettes.tritanomalyVivid.dark- Very bright vivid warm colors for dark backgrounds
-
redsAndOranges - Color combination with predominantly red tones accented by orange
palettes.redsAndOranges.light- Dark reds with orange accents for light backgroundspalettes.redsAndOranges.dark- Bright reds with orange accents for dark backgrounds
-
redsAndYellows - Color combination with predominantly red tones accented by yellow
palettes.redsAndYellows.light- Dark reds with yellow accents for light backgroundspalettes.redsAndYellows.dark- Bright reds with yellow accents for dark backgrounds
-
redsAndGreens - Color combination with predominantly red tones accented by green
palettes.redsAndGreens.light- Dark reds with green accents for light backgroundspalettes.redsAndGreens.dark- Bright reds with green accents for dark backgrounds
-
redsAndBlues - Color combination with predominantly red tones accented by blue
palettes.redsAndBlues.light- Dark reds with blue accents for light backgroundspalettes.redsAndBlues.dark- Bright reds with blue accents for dark backgrounds
-
redsAndPurples - Color combination with predominantly red tones accented by purple
palettes.redsAndPurples.light- Dark reds with purple accents for light backgroundspalettes.redsAndPurples.dark- Bright reds with purple accents for dark backgrounds
-
redsAndBrowns - Color combination with predominantly red tones accented by brown
palettes.redsAndBrowns.light- Dark reds with brown accents for light backgroundspalettes.redsAndBrowns.dark- Bright reds with brown accents for dark backgrounds
-
redsAndGrays - Color combination with predominantly red tones accented by gray
palettes.redsAndGrays.light- Dark reds with gray accents for light backgroundspalettes.redsAndGrays.dark- Bright reds with gray accents for dark backgrounds
-
redsAndMagentas - Color combination with predominantly red tones accented by magenta
palettes.redsAndMagentas.light- Dark reds with magenta accents for light backgroundspalettes.redsAndMagentas.dark- Bright reds with magenta accents for dark backgrounds
-
redsAndCyans - Color combination with predominantly red tones accented by cyan
palettes.redsAndCyans.light- Dark reds with cyan accents for light backgroundspalettes.redsAndCyans.dark- Bright reds with cyan accents for dark backgrounds
-
redsAndCharcoals - Color combination with predominantly red tones accented by charcoal
palettes.redsAndCharcoals.light- Dark reds with charcoal accents for light backgroundspalettes.redsAndCharcoals.dark- Bright reds with charcoal accents for dark backgrounds
-
orangesAndReds - Color combination with predominantly orange tones accented by red
palettes.orangesAndReds.light- Dark oranges with red accents for light backgroundspalettes.orangesAndReds.dark- Bright oranges with red accents for dark backgrounds
-
orangesAndYellows - Color combination with predominantly orange tones accented by yellow
palettes.orangesAndYellows.light- Dark oranges with yellow accents for light backgroundspalettes.orangesAndYellows.dark- Bright oranges with yellow accents for dark backgrounds
-
orangesAndGreens - Color combination with predominantly orange tones accented by green
palettes.orangesAndGreens.light- Dark oranges with green accents for light backgroundspalettes.orangesAndGreens.dark- Bright oranges with green accents for dark backgrounds
-
orangesAndBlues - Color combination with predominantly orange tones accented by blue
palettes.orangesAndBlues.light- Dark oranges with blue accents for light backgroundspalettes.orangesAndBlues.dark- Bright oranges with blue accents for dark backgrounds
-
orangesAndPurples - Color combination with predominantly orange tones accented by purple
palettes.orangesAndPurples.light- Dark oranges with purple accents for light backgroundspalettes.orangesAndPurples.dark- Bright oranges with purple accents for dark backgrounds
-
orangesAndBrowns - Color combination with predominantly orange tones accented by brown
palettes.orangesAndBrowns.light- Dark oranges with brown accents for light backgroundspalettes.orangesAndBrowns.dark- Bright oranges with brown accents for dark backgrounds
-
orangesAndGrays - Color combination with predominantly orange tones accented by gray
palettes.orangesAndGrays.light- Dark oranges with gray accents for light backgroundspalettes.orangesAndGrays.dark- Bright oranges with gray accents for dark backgrounds
-
orangesAndMagentas - Color combination with predominantly orange tones accented by magenta
palettes.orangesAndMagentas.light- Dark oranges with magenta accents for light backgroundspalettes.orangesAndMagentas.dark- Bright oranges with magenta accents for dark backgrounds
-
orangesAndCyans - Color combination with predominantly orange tones accented by cyan
palettes.orangesAndCyans.light- Dark oranges with cyan accents for light backgroundspalettes.orangesAndCyans.dark- Bright oranges with cyan accents for dark backgrounds
-
orangesAndCharcoals - Color combination with predominantly orange tones accented by charcoal
palettes.orangesAndCharcoals.light- Dark oranges with charcoal accents for light backgroundspalettes.orangesAndCharcoals.dark- Bright oranges with charcoal accents for dark backgrounds
-
yellowsAndReds - Color combination with predominantly yellow tones accented by red
palettes.yellowsAndReds.light- Dark yellows with red accents for light backgroundspalettes.yellowsAndReds.dark- Bright yellows with red accents for dark backgrounds
-
yellowsAndOranges - Color combination with predominantly yellow tones accented by orange
palettes.yellowsAndOranges.light- Dark yellows with orange accents for light backgroundspalettes.yellowsAndOranges.dark- Bright yellows with orange accents for dark backgrounds
import { highlight_value, palettes } from 'kyrie';
const data = { name: 'Alice', items: [1, 2, 3] };
// Use light variant (dark colors for light backgrounds)
console.log(highlight_value(data, { palette: palettes.forest.light }));
// Use dark variant (light colors for dark backgrounds)
console.log(highlight_value(data, { palette: palettes.bold.dark }));npm testMIT


