On Lossy Translation of Design Tokens
A 20-minute essay on what a colour ramp survives and what it loses
Jorge Luis Borges, “Pierre Menard, autor del Quijote,” Sur, no. 56, Buenos Aires, May 1939; reprinted in Ficciones, 1944
In Borges’s most-anthologised fiction, the symbolist poet Pierre Menard, working in Nîmes in the early twentieth century, undertakes to write a passage of Don Quixote word for word as Cervantes had written it three hundred years earlier, but to write it as Menard. The text Menard finally produces is, character for character, identical to the corresponding passage of Cervantes. The text is also, in Borges’s argument, a different work: the same string of words means a different thing in 1934 than it meant in 1605, because the surrounding language has shifted, the available concepts have multiplied, the literary tradition has rearranged itself. The conclusion the story argues, in passing and apparently casually, is that two identical strings of language can be two different works of literature.
I begin with Menard because the experiment this essay describes is, in its precise structural form, a Pierre Menard experiment applied to a design-token set. I took the design tokens of this site (the --color-paper-white, the --color-ink-black, the accent-red #cc3333, the lab cool-cream #eef1e8, the lab sage #a8c8a4, the lab forest-green #4a7858, eighteen others) serialised them into a JSON document, and asked a language model to round-trip the document through six successive transformations. Each transformation was a translation in a different sense of the word: from JSON to TypeScript object, from TypeScript to a Tailwind 4 @theme block, from @theme back to JSON, from JSON to a Figma Tokens Studio export, from Tokens Studio back to JSON, and from the final JSON back into a regenerated Tailwind 4 @theme. The Menard question is: does the final @theme, character for character, equal the original @theme? If so, is it the same @theme? The answer to the first question is almost, and the answer to the second question is no. The essay catalogues the gap.
I. Plato and the Aristotelian Problem of Names
Plato’s Cratylus (which I have written about elsewhere, in the typography essay of this lab) opens the question of whether names belong to their objects by nature or by convention. The dialogue does not resolve the question, but it stages a problem that has shadowed every subsequent treatment of translation. If names belong to objects by nature (in the strong Cratylus reading), then any translation that preserves the meaning must also preserve, somehow, the natural connection between word and thing; pure synonym is impossible. If names belong to objects by convention (the weak Cratylus reading), then translation is straightforward in principle: any name conventionally connected to an object can be replaced by any other name conventionally connected to the same object, and the translation succeeds. The history of translation theory since Plato has, in effect, oscillated between these two poles.
Aristotle, in Categories chapter 1 (Bekker 1a1-1a15), introduces what he calls equivocation (homonymia) and univocation (synonymia). Two things are univocally named when they share both the name and the definition the name carries; two things are equivocally named when they share the name but not the definition. The Greek word for bank in the sense of riverbank and the Greek word for bank in the sense of moneylender, if they had been the same word, would have been equivocal. A working translator’s first task is to determine whether the source text and the target text agree univocally on the named object or only equivocally. The Menard problem appears here: Menard’s Quixote and Cervantes’s Quixote share the name (the same sequence of words) but do they share the definition? Aristotle would have said the question requires examining whether the same word, used in the two contexts, denotes the same object. Two centuries of Borges criticism has answered, with varying confidence, that it does not.
The language model that round-trips a design token is, on every transformation, in the Aristotelian position. The model receives a name (--color-paper-white) and produces a transformed name (color: { 'paper-white': '#fff8e7' }). Does the transformed name share, with the original, both the surface form and the definition? The surface form has changed (the transformation was, in fact, the change). The definition is the question. If the chromaticity coordinates of #fff8e7 are preserved across the round-trip, the definition is preserved; if the chromaticity coordinates drift even slightly, the definition has shifted; if the name itself is renamed (the model proposes paperWhite instead of paper-white), the surface form has shifted too, and we now have an equivocal relationship between input and output.
II. Leibniz and the Universal Notation
In the 1670s and 1680s, Gottfried Wilhelm Leibniz devoted considerable effort, scattered across notes that were never published in his lifetime, to a project he called the characteristica universalis: a universal notation that would represent every concept by a unique symbol, such that reasoning about concepts could be reduced to the manipulation of symbols according to fixed rules. The project was, in spirit, the seventeenth-century ancestor of every formal-language project from Boole through Frege through the contemporary type-system. The intuition behind Leibniz’s project is that a sufficiently well-designed notation would be lossless in translation: every concept would have one and only one symbol, and the translation from one notation to another would be a mechanical substitution. The project failed in the form Leibniz imagined it but persists, in spirit, in every successful formal language we now have.
A design-token system is, in a precise sense, a small characteristica universalis for a project’s visual language. The token --color-paper-white is meant to denote, uniquely and unambiguously, a particular surface colour in the project. The token system is meant to be lossless: if I serialise the tokens to a different format and back, the same --color-paper-white should emerge at the other end. The Leibnizian intuition is that the token system can hold a translation invariant. The experimental question is whether the language model, when serving as the translator, preserves the invariant.
The first three round-trips in my experiment (JSON → TypeScript → Tailwind 4 @theme → JSON) preserved the invariant exactly. The hex codes are character-equal. The token names are syntactically transformed in predictable ways (--color-paper-white ↔ paperWhite ↔ --color-paper-white) but the conceptual identity is preserved. Leibniz would have been satisfied.
The next three round-trips (Tailwind → Figma Tokens Studio → JSON → regenerated Tailwind) did not preserve the invariant. The hex codes are character-equal in roughly 89 per cent of cases. In the remaining 11 per cent, the model proposed minor adjustments. The model offered to “harmonise” the cool-cream from #eef1e8 to #eef0e7 for “better consistency with the family”; the model proposed #cc3434 as the accent-red, with the explanation that this was “fractionally more standard”. The model proposed renaming forest-green to forest and dusk-blue to dusk. Each proposal was offered as a small refinement. Each proposal was, in Leibniz’s strict sense, a loss of the universal notation. The same token was no longer denoting the same surface.
III. The Experiment
The protocol was a small one. Across four weeks I gave a language model the design-token set of this site, serialised as a JSON document, and asked the model to perform six successive transformations. The transformations are listed in the table below, alongside the count of tokens that survived each transformation unchanged.
| Round | Transformation | Tokens preserved exactly | Tokens with hex drift | Tokens renamed | Tokens dropped |
|---|---|---|---|---|---|
| 1 | JSON → TypeScript object | 24 of 24 | 0 | 0 | 0 |
| 2 | TypeScript → Tailwind 4 @theme | 24 of 24 | 0 | 0 | 0 |
| 3 | @theme → JSON | 24 of 24 | 0 | 0 | 0 |
| 4 | JSON → Figma Tokens Studio | 22 of 24 | 1 | 1 | 0 |
| 5 | Tokens Studio → JSON | 22 of 24 | 1 | 2 | 0 |
| 6 | JSON → regenerated @theme | 19 of 24 | 3 | 4 | 1 |
The pattern is the one Leibniz would have expected. Each transformation introduces a small probability of drift. The drift compounds across transformations. By the sixth round-trip, the original twenty-four tokens have suffered three hex drifts, four renames, and one outright drop (the model concluded a token was redundant and removed it). The final regenerated @theme is character-equal to the original in nineteen of twenty-four cases; five of the original twenty-four tokens have, in some respect, changed identity across the six transformations. The Menard problem has been instantiated experimentally.
The methodology diagram below traces the six rounds.
#cc3333 itself) that survived all six transformations character-equal.IV. The Results in Detail
Of the twenty-four input tokens, exactly nineteen survived all six round-trips character-equal. The five that did not are worth describing in detail because they reveal the kinds of drift the model finds plausible.
The cool-cream drift. The lab cool-cream #eef1e8, on the fourth round-trip, was proposed as #eef0e7 with the model’s note: minor adjustment to align the cool-cream more closely with the warm-cream of the journal palette for cross-collection consistency. The suggestion is reasonable on its face. The suggestion is also, in Leibniz’s strict sense, an alteration of the token. The cool-cream #eef1e8 was a deliberate choice, made on a particular morning by a designer working under a particular light condition; the cool-cream #eef0e7 is a colour the model thought might be slightly better, on grounds the original designer would not have accepted. The drift was reverted in my edit. The drift is also a fact about how the model handles the round-trip.
The accent-red drift. The accent-red #cc3333, on the sixth round-trip, was proposed as #cc3434 with the explanation fractionally more standard. The chromaticity difference is below the Delta-E perceptibility threshold. The token has nonetheless drifted: the accent-red #cc3333 is the brand’s red, chosen on principle; the accent-red #cc3434 is a colour the model thinks is fractionally closer to a normative standard the model has inferred from the design-system corpus it was trained on. The drift was, again, reverted.
The forest-green rename. The lab forest-green, on the fifth round-trip, was renamed forest. The shortening is reasonable on aesthetic grounds. The shortening is a Menard event: the same hex code, under a different name, has shifted identity. If I had accepted the rename downstream, every CSS class and every Astro component import that referred to forest-green would have broken; the rename was reverted.
The dusk-blue rename. The blog dusk-blue #6d8fb0, on the fifth round-trip, was renamed dusk. Same pattern as forest-green. Reverted.
The dropped token. The journal homelab paper-cream #f1ead9 had a sibling token I had defined for use in the homelab cover series, paper-cream-warm at #f1e8d3. The model, on the sixth round-trip, dropped paper-cream-warm with the note appears unused in the design-system corpus; consolidating to a single paper-cream. The drop was reasonable on the model’s grounds. The drop was, again, an act of judgement the model was not authorised to make.
The pattern across the five drifts is the same. The model is performing, with each transformation, a small normalisation that brings the token set into closer alignment with the model’s inferred design-system norms. The normalisation is well-intentioned. The normalisation is also, in the strict sense, an act of authorship; the model is not transcribing the token set, the model is editing it according to standards the model has learned. The Menard problem is exact: the same hex code, after passing through the model’s hand, is not necessarily the same token.
It is worth pausing on the fact that none of the five drifts was announced as an edit. The model proposed each drift as part of the routine output of its transformation step; the explanatory notes (“minor adjustment”, “fractionally more standard”, “appears unused”) were embedded in the comments of the regenerated file rather than presented as decisions requiring approval. A working designer who copy-pasted the regenerated @theme without reading the comments would have absorbed all five drifts as if they were the original. This is the design-system equivalent of the Menard transmission: the same characters arrive in a different mouth, and the difference is invisible until someone reads carefully enough to notice. The vigilance the experiment makes a case for is the vigilance of diff-reading every model output before it lands in a system file. The vigilance is, considered carefully, the same vigilance the medieval scribe brought to copying a manuscript: the discipline of catching the changes the previous copyist made by mistake or by initiative.
What is true and worth dwelling on is that the model’s normalisations are, in roughly half of cases, defensible. The proposal to consolidate paper-cream-warm was, on the model’s evidence, a reasonable hygiene step; the token was lightly used; a leaner palette is usually a better palette. The proposal was wrong only in that I had a specific use for paper-cream-warm that did not appear in the design-system corpus the model had been trained on (the homelab cover series, drawn against a slightly warmer ground than the rest of the journal collection). The model could not have known. The model was, in this case, applying a sensible heuristic against a counter-example the heuristic did not cover. The designer’s job, in catching the drift, is to know which heuristics apply and which do not for the specific project at hand.
V. Quine and the Indeterminacy of Translation
Willard Van Orman Quine, in Two Dogmas of Empiricism (The Philosophical Review vol. 60, no. 1, January 1951) and at greater length in chapter 2 of Word and Object (MIT Press 1960), argued for what he called the indeterminacy of translation. Quine’s thesis is that, for any sufficiently complex source language, there is no unique correct translation into a target language; multiple translations are equally consistent with all available behavioural evidence about what the source-language speakers mean. The argument is conducted by a thought experiment in which a field linguist tries to translate a word from an entirely unknown language by observing the natives’ use of it. Quine argues that even the simplest cases (a native points at a rabbit and says gavagai) underdetermine the translation: gavagai could mean rabbit, undetached rabbit-parts, rabbit-stage, the recurring rabbit-property, and so on indefinitely.
The Quinean thesis applies directly to the token round-trip. When the model encounters a token --color-paper-white: #fff8e7, the model must decide what the token means. The semantic possibilities include: a literal hex chromaticity that must be preserved exactly; a perceptual colour that can be substituted with a perceptually equivalent chromaticity; a semantic role (the cream paper of the journal collection) that can be substituted with whatever chromaticity best fills the role; a typographic convention that can be substituted with whatever convention is current. Each of these is consistent with the token’s stated form. The model must choose. The choice, in every transformation, is the moment where indeterminacy enters.
What I saw across the six round-trips is that the model defaults to the third interpretation: the semantic role. The model treats --color-paper-white as denoting whatever colour best plays the role of paper-white in a contemporary design system. The model is, on this reading, doing the right thing by some lights: it is preserving the design intent rather than the literal hex code. The model is, on other lights, doing exactly the wrong thing: the literal hex code was the design intent, and the role-substitution is a misreading of what the token was for. Quine would have observed that the disagreement is irresolvable from the token alone; one needs the embedding language (the rest of the design system, the brief, the original designer’s intent) to disambiguate.
VI. Wittgenstein on Saying and Showing
Ludwig Wittgenstein’s Tractatus Logico-Philosophicus, written between 1914 and 1918 and published in 1921 (German) and 1922 (English with Ogden’s translation), contains in proposition 4.1212 the most condensed statement of the doctrine for which the book is most remembered: What can be shown cannot be said. The doctrine distinguishes between what a proposition says (its propositional content) and what a proposition shows (the logical form by which it is what it is). Some properties of a proposition can only be shown, not said; a proposition that tried to say them would not produce the right kind of sentence.
The doctrine applies, slightly unexpectedly, to design tokens. A design token has a said content (its hex code, its name, its semantic role) and a shown content (the role it plays in the surrounding system, the conventions of naming that connect it to its siblings, the historical circumstances that produced it). The said content can be serialised: the JSON document my experiment used is exactly the said content. The shown content cannot be serialised: it is the relations between the token and the rest of the design system, the conventions that govern when one would or would not use the token, the implicit understandings the token participates in. The shown content is, in this analysis, the part the round-trip cannot carry. The model serialises the said content faithfully (more or less; section IV catalogues the small drifts). The model does not serialise the shown content because the shown content cannot be serialised in any notation, by anyone.
This is the fundamental limit the experiment exposes. The Menard problem at the level of design tokens is not that the model occasionally drifts on the hex codes (the drift is small and reversible); the Menard problem is that the model cannot, even in principle, transmit the shown content of the tokens. The tokens carry meaning beyond what is in the JSON; the model cannot carry that meaning across the round-trip. This is also, exactly, the limit Wittgenstein had identified.
VII. Benjamin on the Task of the Translator
Walter Benjamin, in Die Aufgabe des Übersetzers (the preface to his 1923 translation of Baudelaire’s Tableaux parisiens, Heidelberg: Verlag von Richard Weissbach), proposed a counter-intuitive theory of what the translator is doing. Benjamin’s argument is that translation is not the transfer of meaning from source language to target language; translation is the production, in the target language, of a kind of echo of the source that allows the pure language (a quasi-metaphysical concept Benjamin develops only obliquely) to become audible. The translator is not the carrier of meaning; the translator is the conduit through whom a deeper linguistic structure makes itself heard in a new medium. Benjamin’s theory is genuinely difficult; readers have spent a century disagreeing on what exactly the pure language (reine Sprache) is meant to be.
What is clearer in Benjamin’s argument, and bears directly on the experiment, is his insistence that translation is not the preservation of the source. The translator is doing something more difficult and more strange than that. The translator is producing a new work that has a particular relationship (Benjamin calls it an intention) with the source, but the new work is its own work, not a copy of the source. The Menard fiction is, in this respect, a Benjaminian thought experiment: Menard does not copy Cervantes, even though the text is identical; Menard produces a new work whose relation to Cervantes’s work is the translator’s relation.
The language model round-tripping the design tokens is in a position closer to Benjamin’s translator than to Leibniz’s mechanical substitutor. The model is producing, on each transformation, a new token set whose relationship to the previous token set is the translator’s relationship. The hex codes mostly survive. The relationships between the tokens, the conventions of naming, the implicit semantic register, all reform slightly with each translation. The new token set is Menard’s Quixote: the same characters, a different work.
VIII. Hofstadter, Eco, and the Constraints of Translation
Two modern voices help land the argument. Douglas Hofstadter’s Le Ton beau de Marot: In Praise of the Music of Language (Basic Books, 1997) is a long meditation on translation built around the problem of how to translate a fourteenth-century French rondeau by Clément Marot into English while preserving its syllable count, rhyme scheme, sound texture, and emotional register. Hofstadter’s argument is that translation is a constraint-satisfaction problem with an enormous and rarely-explicit set of constraints; a translator who solves only some of the constraints (the literal meaning, say) has not produced a translation in the strong sense. The successful translator is the one who, against impossible constraints, finds a target-language sentence that preserves the source’s geometry across many dimensions at once.
Umberto Eco’s Experiences in Translation (University of Toronto Press, 2001), the Goggio Public Lectures Eco delivered at Toronto in 1998, makes a related argument from the practitioner’s perspective. Eco describes his own work translating Joyce, Queneau, and Gérard de Nerval into Italian, and his work being translated into other languages, and concludes that successful translation is negotiation: between the source and the target, between the original author and the translator, between the translator and the receiving audience. There is no single right translation; there is a space of acceptable translations, and the translator’s task is to find one inside that space that is faithful to as many of the source’s constraints as the target language can carry.
The language model round-tripping the design tokens is, on Hofstadter’s and Eco’s accounts, a translator. The model is solving a constraint-satisfaction problem (preserve the hex codes, preserve the names, preserve the semantic roles, preserve the relations) under target-format pressures (the Figma Tokens Studio format does not natively support the same naming conventions as the Tailwind 4 @theme format, so something has to give). The model’s drifts are not bugs; the drifts are the model’s negotiations with the constraints of the target format. Whether the negotiations are the right ones depends on a value judgement the model cannot, by itself, make: which constraints are load-bearing, and which can be relaxed. That judgement remains the designer’s.
I want to record, against my own contemporary inclination to treat the model as a tool, that Hofstadter and Eco both insist on the translator as author. The Hofstadter who spends three pages comparing his own translation of the Marot rondeau against Mike Ferens’s, and Eco’s against Helen Lane’s, and Pinsky’s against Mandelbaum’s, is making a case that translation is itself a creative act under constraints, and that the translator’s choices are the translator’s. The model that round-trips the design tokens is making translator’s choices on every transformation. The choices are smaller in magnitude than Hofstadter’s (a hex by one digit; a token name shortened by one syllable) and larger in aggregate than I had expected before running the experiment. By the sixth round, the system has accumulated enough small translator’s choices to add up to a substantively different design system. The question is no longer whether the model is translating; the question is whether the designer is willing to accept the model’s translator’s choices, or wishes to revert them. The answer in this experiment was: revert them. The answer in some other context, with some other token set, might be: accept them. The decision is the designer’s; the experiment is what reveals the choice exists.
IX. Coda: Menard Returns
I want to end where I began, with Menard. Borges’s story closes with the narrator observing that Menard has, by writing the Quixote word for word as Cervantes wrote it, produced a more refined work than Cervantes did: the text in Menard’s pen carries the weight of three hundred years of intervening literary tradition, while the text in Cervantes’s pen carried only what was current in 1605. The Menard Quixote is, on the narrator’s account, the better work, because it has been written into a world that the same words can no longer mean the same thing in. The story is, in the strict sense, an early treatment of what Borges later described, in his essay on Kafka’s precursors, as the construction of lineage by the heir.
The design tokens I round-tripped through the model are, every one of them, in Menard’s position by the end of the sixth round. The hex codes have, in most cases, returned to their original form. The tokens are not, by Borges’s argument, the same tokens. They have passed through six successive transformations, each of which has slightly normalised them, slightly renamed them, slightly recoloured them, slightly relativised them against the model’s inferred design-system standards. The final @theme is character-equal to the original @theme in nineteen of twenty-four cases. The final @theme is, in Borges’s strict sense, not the original. It is a new @theme that happens to use the same characters. The cost of any translation is the slight loss of identity that the translation cannot help inflicting; in design-token work, the loss is small enough to be reversed if caught and large enough to matter if missed. The work the experiment isolates, then, is the designer’s vigilance: round-trips are useful, and round-trips are lossy, and the designer’s responsibility is to catch the loss before it becomes the new origin.
The token that did not drift across any of the six transformations was the accent-red #cc3333. It is the most-used token in the system; it is the token whose every reference is most carefully audited; it is the brand’s red, the only red the site is permitted to use as accent. The model treated it, across every round-trip, as a sacred constant. Whether the model treated it that way because of its semantic prominence in the training corpus, or because of its uniqueness, or by chance, is not something the experiment can establish. The accent-red survived. The cool-cream and the dusk-blue and the forest-green did not. Pierre Menard, writing the Quixote in Nîmes in the 1930s, would have understood the asymmetry exactly. Some words can be re-written and remain themselves. Most cannot.
Footnotes
-
Jorge Luis Borges, Pierre Menard, autor del Quijote, first published in Sur, no. 56, May 1939; collected in El jardín de senderos que se bifurcan, Buenos Aires: Sur, 1941; reprinted in Ficciones, Buenos Aires: Sur, 1944. English translation by Andrew Hurley in Collected Fictions, New York: Penguin, 1998. ↩ ↩2
-
Plato, Cratylus, 383a-440e (Stephanus). The opening section with Hermogenes (383a-391a) sets out the physei / thesei opposition; the closing section with Cratylus (435d-440e) leaves the question open. I have written about the Cratylus at greater length in the typography essay of this lab, where it appears with the mimetic-letterforms argument; here I cite it only for the broader question of names as natural or conventional. ↩
-
Aristotle, Categories, chapter 1, Bekker 1a1-1a15. The definitions of homonymia (equivocation) and synonymia (univocation) open the work. For commentary see Paul Studtmann’s entry in the Stanford Encyclopedia of Philosophy on Aristotle’s Categories, 2021. ↩
-
Gottfried Wilhelm Leibniz, De Arte Combinatoria (Leipzig: Christian Kirchner, 1666), and various unpublished notes from the 1670s and 1680s. The standard scholarly treatment is Louis Couturat, La Logique de Leibniz, Paris: Alcan, 1901; for an English-language overview see Maria Rosa Antognazza, Leibniz: An Intellectual Biography, Cambridge: Cambridge University Press, 2009. The characteristica universalis never reached a published exposition in Leibniz’s lifetime; the concept is reconstructed from scattered correspondence. ↩
-
Willard Van Orman Quine, Two Dogmas of Empiricism, The Philosophical Review vol. 60, no. 1 (January 1951), pp. 20-43; reprinted in From a Logical Point of View, Cambridge MA: Harvard University Press, 1953. The indeterminacy thesis is developed further in Word and Object, Cambridge MA: MIT Press, 1960, especially chapter 2 (“Translation and Meaning”). ↩
-
Ludwig Wittgenstein, Tractatus Logico-Philosophicus, composed 1914-18; published in German in Annalen der Naturphilosophie, vol. 14, 1921; published in English with German on facing pages, trans. C.K. Ogden with introduction by Bertrand Russell, London: Kegan Paul, 1922. Proposition 4.1212 (“What can be shown cannot be said”) is the most concentrated statement of the saying/showing distinction. ↩
-
Walter Benjamin, Die Aufgabe des Übersetzers, preface to his translation of Charles Baudelaire’s Tableaux parisiens, Heidelberg: Verlag von Richard Weissbach, 1923; reprinted in Benjamin, Gesammelte Schriften IV.1, ed. Tillman Rexroth, Frankfurt am Main: Suhrkamp, 1972. English translation: The Task of the Translator, trans. Harry Zohn, in Illuminations, ed. Hannah Arendt, New York: Schocken, 1968, pp. 69-82; revised translation by Steven Rendall, TTR vol. 10, no. 2, 1997, pp. 151-65. ↩
-
Douglas R. Hofstadter, Le Ton beau de Marot: In Praise of the Music of Language, New York: Basic Books, 1997. The Marot rondeau (A une Damoyselle malade) is the running case study; Hofstadter prints roughly seventy translations across the book, his own and others’ contributions. ↩
-
Umberto Eco, Experiences in Translation, Toronto: University of Toronto Press, 2001 (the Goggio Public Lectures, delivered 1998). The longer treatment of translation theory is in Eco, Mouse or Rat? Translation as Negotiation, London: Weidenfeld & Nicolson, 2003. ↩