oarust 0.13.0

GPU-first semantic computing engine written in Rust
// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
// schema=ui_style.json schema_version=1 generator_version=64
// schema_sha256=4d49c36b2332eb7e908e804a68090b7b1c45955aa012eaddd72965fcafeb6bb4
//! UiStyle token presets resolved from the schema. Token order: color tokens first, then data_palette, then metric tokens — matching the UiStyle field order in src/rs/lib/ui/type.rs

use super::UiStyle;
use crate::Color;

/// Shared six-color data series palette; alpha-zero artist styles consume it in order.
pub(crate) const REALM_DATA_PALETTE: [Color; 6] = [
	Color::new(0.24, 0.65, 1.0, 1.0),
	Color::new(1.0, 0.47, 0.35, 1.0),
	Color::new(0.35, 0.82, 0.54, 1.0),
	Color::new(0.75, 0.45, 1.0, 1.0),
	Color::new(1.0, 0.8, 0.22, 1.0),
	Color::new(0.3, 0.87, 0.89, 1.0),
];

/// Realm dark theme — mirrors the donor default.
///
/// Token preset `realm_dark`.
pub(crate) fn ui_style_realm_dark() -> UiStyle {
	UiStyle {
		background: Color::new(0.082, 0.082, 0.09, 1.0),
		surface: Color::new(0.141, 0.141, 0.161, 1.0),
		surface_hover: Color::new(0.133, 0.133, 0.133, 1.0),
		surface_active: Color::new(0.188, 0.188, 0.188, 1.0),
		accent: Color::new(0.388, 0.4, 0.945, 1.0),
		accent_hover: Color::new(0.506, 0.549, 0.973, 1.0),
		text: Color::new(0.961, 0.961, 0.961, 1.0),
		text_secondary: Color::new(0.6, 0.6, 0.62, 1.0),
		text_disabled: Color::new(0.4, 0.4, 0.4, 1.0),
		border: Color::new(0.25, 0.25, 0.28, 1.0),
		border_strong: Color::new(1.0, 1.0, 1.0, 0.15),
		plot_background: Color::new_from_u32(0x0A0A0AFF),
		plot_surface: Color::new_from_u32(0x202020FF),
		plot_grid: Color::new_from_u32(0x3F3F3FA6),
		plot_border: Color::new_from_u32(0x585858FF),
		data_palette: REALM_DATA_PALETTE,
		corner_radius: 4.0,
		padding: 8.0,
		font_size: 14.0,
	}
}

/// Realm light theme — the peer resolution of the same token schema
/// Gray surfaces and text follow the Carbon-style light ramp adapted to Realm neutrals; the accent keeps the Realm indigo family deepened for light-surface contrast.
///
/// Token preset `realm_light` (extends `realm_dark`).
pub(crate) fn ui_style_realm_light() -> UiStyle {
	UiStyle {
		background: Color::new(0.957, 0.957, 0.957, 1.0),
		surface: Color::new(1.0, 1.0, 1.0, 1.0),
		surface_hover: Color::new(0.91, 0.91, 0.91, 1.0),
		surface_active: Color::new(0.82, 0.82, 0.82, 1.0),
		accent: Color::new(0.243, 0.275, 0.8, 1.0),
		accent_hover: Color::new(0.345, 0.38, 0.9, 1.0),
		text: Color::new(0.086, 0.086, 0.086, 1.0),
		text_secondary: Color::new(0.322, 0.322, 0.322, 1.0),
		text_disabled: Color::new(0.631, 0.631, 0.631, 1.0),
		border: Color::new(0.878, 0.878, 0.878, 1.0),
		border_strong: Color::new(0.0, 0.0, 0.0, 0.15),
		plot_background: Color::new(0.95, 0.96, 0.97, 1.0),
		plot_surface: Color::new(0.89, 0.91, 0.94, 1.0),
		plot_grid: Color::new(0.78, 0.8, 0.84, 1.0),
		plot_border: Color::new(0.6, 0.63, 0.68, 1.0),
		data_palette: REALM_DATA_PALETTE,
		corner_radius: 4.0,
		padding: 8.0,
		font_size: 14.0,
	}
}

/// Donor media viewer palette (oa::UiStyle::viewerDark) resolved over the Realm dark token set.
///
/// Token preset `viewer_dark` (extends `realm_dark`).
pub(crate) fn ui_style_viewer_dark() -> UiStyle {
	UiStyle {
		background: Color::new_from_u32(0x181818FF),
		surface: Color::new_from_u32(0x303030E8),
		surface_hover: Color::new_from_u32(0x424242F0),
		surface_active: Color::new_from_u32(0x505050F5),
		accent: Color::new_from_u32(0xF5F5F5FF),
		accent_hover: Color::new_from_u32(0xFFFFFFFF),
		text: Color::new_from_u32(0xFFFFFFFF),
		text_secondary: Color::new_from_u32(0xE6E6E6FF),
		text_disabled: Color::new_from_u32(0x777777FF),
		border: Color::new_from_u32(0xFFFFFF20),
		border_strong: Color::new_from_u32(0xFFFFFF38),
		plot_background: Color::new_from_u32(0x0A0A0AFF),
		plot_surface: Color::new_from_u32(0x202020FF),
		plot_grid: Color::new_from_u32(0x3F3F3FA6),
		plot_border: Color::new_from_u32(0x585858FF),
		data_palette: REALM_DATA_PALETTE,
		corner_radius: 15.0,
		padding: 8.0,
		font_size: 15.0,
	}
}