7 of 15

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

Gojek · Co-lead

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

  • In light mode, single gradients that pass WCAG AA with white text went from 1 of 6 to 6 of 6.
  • Work per brand color went 8 → 2 hours, almost 75% less: the proposal's estimate, which held in practice.
  • By the time I left, 3,078 color properties in the main component library were bound to the theme variables.

The 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 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.

My part

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

I also made the call to move themes to Figma variables, 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. I shared the renaming of the product colors. Before this, 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, the rule underneath

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. In the grade-point system, a gap of 50 grades between two colors is meant to pass AA for normal text, and a gap of 70 to pass AAA. A public Figma plugin applies it.

Gradients: contrast first

I fixed contrast before changing any structure, so teams got an accessibility win and nothing broke. For each gradient, I swapped in 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.

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 colors in their own set

I proposed 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.

The wider restructure

With my teammate, I 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, from the impact report and design docs, not measured spend. The saved-effort figure is the impact report's estimate for 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.
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

മന്യു വർമ്മ

I design and build design systems for people and AI agents: tokens, governance, release tooling, and guidelines that agents can follow.

Highlights

Work

Agentic

Early AI

Pre-AI

Hold Alt or Option to see the spacing.