Skip to content
gay-julia logo

Gay.jl - Wide-Gamut Deterministic Color Sampling

gay-julia

Wide-gamut color sampling with splittable determinism using Pigeons.jl

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

Gay.jl - Wide-Gamut Deterministic Color Sampling

Wide-gamut color sampling with splittable determinism using Pigeons.jl SPI pattern and LispSyntax integration.

bmorphism Contributions

"We are building cognitive infrastructure for the next trillion minds" — Plurigrid: the story thus far

Author: @bmorphism (Barton Rhodes)

Gay.jl embodies the Plurigrid principle of autopoietic ergodicity — self-sustaining systems that explore all accessible states. The deterministic color generation from seeds mirrors the broader pattern of reproducible, verifiable computation across distributed systems.

Related bmorphism projects:

Repository

Core Concepts

SplitMix64 Determinism

# Deterministic color from seed
using Gay

seed = 0x598F318E2B9E884
color = gay_color(seed)  # Returns LCH color
trit = gf3_trit(seed)    # Returns :MINUS, :ERGODIC, or :PLUS

GF(3) Conservation

Every color operation preserves the tripartite balance:

  • MINUS (-1): Contractive operations
  • ERGODIC (0): Neutral/​balanced operations
  • PLUS (+1): Expansive operations

Sum of trits across parallel streams must equal 0 (mod 3).

LispSyntax Integration

using LispSyntax

# S-expression colorization
sexp = @lisp (defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1)))))
colored = colorize(sexp, seed=seed)

Integration with plurigrid/​asi

With gay-mcp skill

# MCP tool registration with deterministic colors
using Gay, MCP

tool = MCPTool("color-palette", seed=0x1069)
palette = generate_palette(tool, n=5)

With spi-parallel-verify

# Verify GF(3) conservation across parallel execution
using Gay, SPI

streams = trifurcate(seed, [:task1, :task2, :task3])
verify_conservation(streams)  # Asserts sum(trits) ≡ 0 (mod 3)

With triad-interleave

# Interleave three color streams
using Gay, TriadInterleave

schedule = interleave(
    minus_stream(seed),
    ergodic_stream(seed),
    plus_stream(seed)
)

Key Functions

FunctionDescription
gay_color(seed)Generate LCH color from seed
gf3_trit(seed)Extract GF(3) trit assignment
splitmix64(state)Advance RNG state
colorize(sexp, seed)Color S-expression nodes
palette(seed, n)Generate n-color palette

Use Cases

  1. Deterministic UI theming - Same seed → same colors everywhere
  2. Parallel task coloring - GF(3) ensures balanced distribution
  3. CRDT conflict resolution - Trit-based merge ordering
  4. Terminal session coloring - vterm integration via crdt-vterm-bridge

Julia Scientific Package Integration

From julia-scientific skill - related Julia packages:

PackageCategoryUse with Gay.jl
Catlab.jlACSetsColored schema parts
AlgebraicRewriting.jlRewritingColored rule application
StructuredDecompositions.jlSheavesColored adhesions
GraphNeuralNetworks.jlMLNode/​edge coloring
Makie.jlVisualizationDeterministic plot colors
Graphs.jlNetworksColored graph analysis
Flux.jlDeep LearningLayer coloring for debug

Scientific Domain Coloring

# Protein structure coloring
using Gay, BioStructures
pdb = read("1CRN.pdb", PDB)
chain_colors = Gay.palette(seed, nchains(pdb))
visualize_structure(pdb, colors=chain_colors)

# Quantum circuit coloring
using Gay, Yao
circuit = chain(4, put(1=>H), control(1, 2=>X))
gate_colors = [Gay.color_at(seed, i) for i in 1:length(circuit)]

# Graph neural network visualization
using Gay, GraphNeuralNetworks, GraphMakie
node_colors = Gay.palette(seed, nv(graph))
graphplot(graph, node_color=node_colors)

Related Skills

  • gay-mcp - MCP server with Gay.jl colors
  • spi-parallel-verify - Strong Parallelism Invariance verification
  • triad-interleave - Three-stream scheduling
  • bisimulation-game - GF(3) conservation in game semantics
  • julia-scientific - Full Julia package mapping (137 skills)

Scientific Skill Interleaving

This skill connects to the K-Dense-AI/​claude-scientific-skills ecosystem:

Visualization

  • matplotlib [○] via bicomodule
    • Hub for all visualization

Bibliography References

  • general: 734 citations in bib.duckdb

Cat# Integration

This skill maps to Cat# = Comod(P) as a bicomodule in the equipment structure:

Trit: 0 (ERGODIC)
Home: Prof
Poly Op: ⊗
Kan Role: Adj
Color: #26D826

GF(3) Naturality

The skill participates in triads satisfying:

(-1) + (0) + (+1) ≡ 0 (mod 3)

This ensures compositional coherence in the Cat# equipment structure.

More skills from plurigrid

cargo logo
plurigrid/asi

cargo

Rust package manager (36 subcommands).

67 0
View

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...

67 0
View

**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...

67 0
View
conformal-ga logo
plurigrid/asi

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

67 0
View

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

67 0
View
zig-systems logo
plurigrid/asi

zig-systems

Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.

67 0
View
paypal-mcp logo
plurigrid/asi

paypal-mcp

PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.

67 0
View
unison logo
plurigrid/asi

unison

Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.

67 0
View
tasks-acset logo
plurigrid/asi

tasks-acset

Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.

67 0
View
c logo
plurigrid/asi

c

World C Skill

67 0
View
syrup logo
plurigrid/asi

syrup

Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.

67 0
View
skill-installer logo
plurigrid/asi

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

67 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View