targets.portable: Portable and Creative Deploy Targets#

GIMP/Inkscape palettes (gpl), the dependency-free Python module (pymodule), SVG swatch sheets (swatches), a Slack custom-theme string (slack), the Google-Sheets Stylus userstyle (gsheets), and the CSS custom-properties artifact (cssvars).

Two targets (pymodule, cssvars) each produce a single file that carries both modes at once (parallel _LIGHT dict siblings; a shared :root/.dark stylesheet) rather than one file per mode. render still returns non-empty content for both Mode values as the protocol requires – both calls render the identical combined file, so irix generate writes it twice (idempotently, same bytes) and irix check diffs it twice against the same on-disk content.

GplTarget fixes two corruptions discovered in the original hand files: irix-dark.gpl’s gray-sheet1 row read 0 17 17 (should be 17 17 17 = #111111), and eight radix-dark.gpl rows carried a scrambled <hue>-tex21 label where <hue>-text2 was meant. Both are structurally impossible to reproduce from this generator, since rows are built from Color.SHADE_NAMES directly rather than hand-typed.

GsheetsTarget is a fidelity-first regeneration, not a redesign: the hand-authored out/browsers/irix-dark-gsheets.user.css was verified value-current, so its structural CSS is captured verbatim as a string.Template, and only the palette-derived spots are re-resolved through addresses recorded in irix/data/anchors/portable.yaml.

SwatchesTarget and CssvarsTarget render every entry in the curated 20-hue Irix chamber set (Color.IRIX_MAP flattened) in canonical chamber/hue/shade order; GplTarget’s radix half additionally covers the full 34-hue Radix superset via palette_for(mode, full=True), ordered alphabetically by hue name.

Portable/creative deploy targets: gpl, pymodule, swatches, slack, gsheets, cssvars.

GIMP/Inkscape palettes, the dependency-free Python module, SVG swatch sheets, a Slack custom-theme string, the Google-Sheets Stylus userstyle, and the CSS custom-properties artifact.

Two targets (pymodule, cssvars) each produce a single file that carries both modes at once (parallel _LIGHT dict siblings; a shared :root/.dark stylesheet) rather than one file per mode. render still returns non-empty content for both Mode values as the protocol requires – both calls render the identical combined file, so irix generate writes it twice (idempotently, same bytes) and irix check diffs it twice against the same on-disk content.

GplTarget fixes two corruptions discovered in the original hand files while auditing this squad’s brief: irix-dark.gpl’s gray-sheet1 row read 0 17 17 (should be 17 17 17 = #111111), and eight radix-dark.gpl rows carried a scrambled <hue>-tex21 label where <hue>-text2 was meant. Both are structurally impossible to reproduce from this generator, since rows are built from Color.SHADE_NAMES directly rather than hand-typed.

GsheetsTarget is a fidelity-first regeneration, not a redesign: the hand-authored out/browsers/irix-dark-gsheets.user.css was verified value-current, so its structural CSS is captured verbatim as a string.Template (_GSHEETS_TEMPLATE), and only the palette-derived spots – the 36-value slate/sage/jade ramp plus ten -rgb decimal companions – are re-resolved through addresses recorded in irix/data/anchors/portable.yaml. One quirk that fidelity alone would have reproduced was corrected instead. Every -rgb companion mirrored slate’s value even though the token backbone’s --sheet1/--shape1/etc aliases a few lines above it point at sage – design drift in the original hand file (the backbone was retargeted from slate to sage at some point and the -rgb literals were never updated to match). This is not a stylistic call: each -rgb property is the decimal companion of one specific backbone var, used as rgba(var(--x-rgb), alpha) for state-layer overlays, so it must decode to the same color as that var or the overlay tints disagree with the solid chrome around it – the same value-must-match-address invariant every other RGB-decimal target in this repo enforces (see shell.py’s _sgr, rust.py’s _rgb_literal). All ten rgb_* anchors now point at sage, matching the backbone; see the anchor table’s rgb_* comment.

SwatchesTarget and CssvarsTarget render every entry in the curated 20-hue Irix chamber set (Color.IRIX_MAP flattened) in canonical chamber/hue/shade order; GplTarget’s radix half additionally covers the full 34-hue Radix superset via palette_for(mode, full=True), ordered alphabetically by hue name for a deterministic (if not chamber-curated) layout.

class irix.targets.portable.GplTarget(*, name: str = 'gpl', family: str = 'inkscape')#

Bases: Target

GIMP/Inkscape .gpl swatches: the irix curated set plus the full Radix superset.

Both files, both modes – see the module docstring for the two corruptions this regeneration fixes.

render(mode: Mode) → dict[str, str]#

Render inkscape/irix-{mode}.gpl and inkscape/radix-{mode}.gpl.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.portable.PymoduleTarget(*, name: str = 'pymodule', family: str = 'python')#

Bases: Target

The dependency-free out/python/irix.py copy-paste module.

Both modes render the same combined dark+light file (see module docstring).

render(mode: Mode) → dict[str, str]#

Render the combined python/irix.py; identical for both mode values.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.portable.SwatchesTarget(*, name: str = 'swatches', family: str = 'web')#

Bases: Target

SVG swatch sheets: one 20x12 grid per mode.

render(mode: Mode) → dict[str, str]#

Render web/irix-{mode}-swatches.svg.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.portable.SlackTarget(*, name: str = 'slack', family: str = 'web')#

Bases: Target

Slack’s 8-hex custom-theme string, one file per mode.

render(mode: Mode) → dict[str, str]#

Render web/irix-{mode}-slack.txt.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.portable.GsheetsTarget(*, name: str = 'gsheets', family: str = 'browsers')#

Bases: Target

The Google-Sheets Stylus userstyle.

Dark reproduces the hand-authored file byte-for-byte except the ten -rgb decimal companions, retargeted from slate to sage to match the token backbone; light is the same addresses resolved through the light palette. See the module docstring for the fidelity approach and the corrected quirk.

render(mode: Mode) → dict[str, str]#

Render browsers/irix-{mode}-gsheets.user.css.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.portable.CssvarsTarget(*, name: str = 'cssvars', family: str = 'web')#

Bases: Target

The CSS-custom-properties artifact.

Both modes render the same combined :root/.dark stylesheet (see module docstring); its values must agree with both the palette YAMLs and the hand-maintained root irix-theme.css – see tests/test_targets_portable.py’s TestCssvarsTarget for the drift gate.

render(mode: Mode) → dict[str, str]#

Render the combined web/irix-vars.css; identical for both mode values.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].