7 of 15

Asphalt color tokens as cards on a green frame: primary green 00880D, primary red EA001F, payments blue 0081A0, burnt orange C85200, crimson red E52535 and neutral greys, each with a lighter secondary tint such as EAFFEA and FFF8F8, beside an accessibility AA badge.
Asphalt's brand and functional colors, with their tokens

Color Tokens

Asphalt's color-token restructure at Gojek, which I co-led, with the gradient fix and the brand split as my own parts.

Impact

  • Adding or updating one brand color went 8 → 2 hours of work, almost 75% less, because it's set once in a shared brand set instead of in every theme file.
  • By the time I left, 3,078 color properties in the main component library were bound to the theme variables.
  • In light mode, single gradients that pass WCAG AA with white text went from 1 of 6 to 6 of 6.

Problem

Asphalt is Gojek's design system. Its color tokens had grown hard to use, and three problems stood out.

  • Too few colors. Text and borders had no brand colors. GoFood, Gojek's food-delivery service, needed more expressive colors for its redesign, and the merchant app's theme had no green for success.
  • Brand colors everywhere. Brand colors started in icons, then spread into the colors meant to carry meaning, such as success and error. In the fill tokens alone, brand colors grew from 3 to 7. Each brand color was copied into every theme and every mode: light, dark and two high-contrast modes. With the planned additions, the consumer theme was heading for 13 green tokens.
  • Gradients that failed contrast. In light mode, only 1 of the 6 gradients, the purple one, passed WCAG AA with white text, yet products kept putting text on them. Gradients came up in 50+ separate conversations in a single month.

Approach

I co-led the restructure with a teammate. Two parts were my own; I wrote both proposals and was accountable for them:

  • the gradient fix
  • moving brand colors out of the themes and into one shared set

The move of themes to Figma variables was also my call, so a file switches theme by changing one setting instead of being restyled by hand. The variables proposal estimated that re-theming files by hand cost the two teams on other themes about $200,000. The renaming of the product colors was shared work. Earlier, I co-authored the grade-point system the work rests on and co-created the data-visualization palette, which the merchant app used most.

Grade points. Every Asphalt color has a grade: the higher the grade, the darker the color. The gap between two grades usually tells a designer whether a pair passes contrast, without a checker: each size of gap is meant to pass a set contrast level. A public Figma plugin applies the rule.

How many grades apart two colors need to be

Grades run from 0 to 100. The rule is meant to hold, and usually does; a few dark-mode pairs needed checking.

To passGap
AA, large text40 grades
AA, normal text50 grades
AAA, normal text70 grades

Gradients. Contrast came first, before any change to structure, so teams got an accessibility win and nothing broke. Each gradient got the closest color of the same hue with a grade high enough to pass. After the fix, all 34 fill gradient tokens passed AA with white text, at 4.50:1 or more. The fix went to the Figma library, and to code through the token pipeline.

Gradients that pass AA with white text, out of 6

Light mode, single gradients.

Count
Before1 of 6
After6 of 6

I then designed a simpler structure for the gradient library, with 15 intents. It reached the design libraries, but its code never shipped. A high-contrast gradient set stayed a plan.

Brand set. The proposal was one shared brand set, with the same structure as the other colors. One set, with light, dark and high-contrast values, serves every theme.

  • Less work. The token files to edit for a new brand color went from 16 to 4.
  • Accessible by rule. A brand fill sits at grade 50 or more, and brand text at 60 or more, so every pair passes AA, as the final token files confirm.

Adding or updating one brand color

It's set once in a shared brand set, instead of in every theme file.

Value
Before8 hours
After2 hours

Wider restructure. We rebuilt how tokens are named, so each name says what the color is for. The chain has three steps: a primitive color with light and dark values, a theme token such as background/primary that points to it, and the component color bound to that token.

  • We renamed the 7 product-category colors to plain color names, such as green and violet.
  • Fills and icons named after products were retired. Four opacity levels, 70, 50, 30 and 10%, replaced the old overlay token.
  • Every theme gained a success color.
  • In all, the restructure added 44 new tokens, or 212 values once each is counted per mode and theme. Each theme went from 61 to 91 color tokens per mode, counting the shared brand set.

Where it stands

Shipped.

Every Gojek app of the time used the new tokens, except the payments app, which had become a separate product. Every dollar figure here is an estimate of effort saved, not measured spend. The saved-effort figure covers one team, across design, engineering and the move to variables. Of that, the design doc estimated $105,278.80 saved in design work on future token additions. The brand-split proposal estimated about $144 a year saved on brand-color updates.

More results

  • Measured from the final token files, every brand token passes WCAG AA as text and as a fill, in light and dark mode: 42 of 42 pairs.
  • The impact report estimated about $242,700 in saved effort for one team, across design, engineering and the move to variables.
  • By the end, the tokens ran on 2 themes, each with a high-contrast version: green for the consumer and driver apps, and purple for the merchant app.
  • Brand colors moved into one shared set of 35 tokens: 7 hues, each with a fill, a secondary fill, a border, an icon and a text color.
  • The data-visualization palette has 5 hues with 6 steps each, in light and dark, and every hue step meets 3:1 contrast against the background.
  • A public Figma plugin applies it, with about 1.5k downloads on Figma Community.
Six gradient swatches with white "Lorem ipsum" text, each above a contrast panel. Only purple passes AA for normal text.
Gradient contrast before the fix
Token structure table. Types: fill, border, icon and typography. Sub-types: dynamic and static, for icons. Roles from default, active and success to opacity, text styles and brand color name. Intents: primary to quaternary, plus white and black for static roles.
How token names are built: type, sub-type, role and intent
Asphalt's data-visualization palette. Red, yellow, blue, purple and green each have six steps, shown on a light card and a dark card with hex values. A neutral group holds three midpoints for divergent pairs.
The data-visualization palette in light and dark, with neutral midpoints for divergent pairs

Manyu Varma

മന്യു വർമ്മ

Thinking beyond just consistency, building design systems at scale through robust yet flexible foundations, strategy and planning, relevant design, and AI workflows.

Highlights

Work

Agentic

Early AI

Pre-AI

Hold Alt or Option to see the spacing.