# Chrome's --blink-settings flag is last-wins

> Chrome's --blink-settings flag sets Blink preferences like colour scheme and pointer type. A second copy deletes the first, so six profiles all came back dark.

Source: https://mosaicbrowser.com/blog/blink-settings-last-wins

## --blink-settings is last-wins, and that cost us a profile

Chrome's --blink-settings flag sets Blink preferences like colour scheme and pointer type. A second copy deletes the first, so six profiles all came back dark.

![6: Six profiles configured, six came back dark](https://mosaicbrowser.com/covers/blink-settings-last-wins.webp)

Chrome's `--blink-settings` flag sets values in Blink's settings at launch, written as comma-separated `key=value` pairs, and it is last-wins per process. Pass it twice and the second copy replaces the first; nothing is merged. We learned that by building six profiles, each given its own colour-scheme setting, and watching every one of them report dark, which is the setting on the Mac they ran on.

## What we use --blink-settings for

Two jobs, both about values a page reads from CSS rather than from JavaScript.

The first is pointers. Media queries like `(pointer: coarse)` and `(hover: none)` are computed from four Blink settings: `primaryPointerType`, `availablePointerTypes`, `primaryHoverType` and `availableHoverTypes`. Our first Android profile reported five touch points and `ontouchstart`, while `(pointer: coarse)` and `(hover: none)` both came back false, because those values were fixed at the desktop answer. A device with five touch points and a fine pointer that can hover is not a phone and not a laptop. A phone now gets coarse only and no hover; a touch laptop gets a trackpad and a touch screen.

The second is the owner's own settings. Two profiles that shared nothing (different hardware, screens and GPUs) both reported `prefers-color-scheme: dark`, `prefers-reduced-motion: reduce` and `prefers-reduced-transparency: reduce`. So did the Mac they ran on. They also sent those three as `Sec-CH-Prefers-*` request headers, so a site did not even need to run a script to collect them.

Dark mode alone is one bit. The accessibility pair is the serious part: few people turn those settings on, so every profile on the machine wore a rare trait, and the same one. That is a join key across every profile on one computer. So each profile now draws its own preferences (dark mode at 30%, the share real browsers send), and `--blink-settings` delivers them.

![A Mosaic profile's fingerprint tab, with locale and hardware drawn for its IP](https://mosaicbrowser.com/shots/fingerprint-detail.png)
*Each profile draws its own values, then the engine is told them*

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Fingerprints set inside the browser](https://mosaicbrowser.com/features/engine)

## How the second flag deleted the first

The pointer settings came first, as one `--blink-settings` in our launcher. The preference settings were added later, further up the same function, as a second `--blink-settings`. Both lines looked right. Chromium kept the later one, which was the pointer block, and threw the preferences away.

The symptom was a profile that looked configured and reported the host. Six profiles, each told its own colour scheme, all came back `dark`. Nothing crashed and nothing logged a warning, because from Chromium's side nothing was wrong: it was given a switch twice and used the last value, as it does for most switches.

The fix is structural rather than careful. There is one array, built in one place, and everything that needs a Blink setting appends to it before a single `--blink-settings=` is pushed. Our build check `check:preferences` counts how many `--blink-settings` switches the launcher builds, and fails at more than one.

## The enum values, measured rather than guessed

The keys take Blink's internal numbers, and two of them caught us out:

| Key | Values |
| --- | --- |
| `preferredColorScheme` | 0 dark, 1 light |
| `preferredContrast` | 0 more, 1 less, 2 no preference, 3 custom |
| pointer types (bitmask) | 1 none, 2 coarse, 4 fine |
| hover types (bitmask) | 1 none, 2 hover |

Contrast was the trap. Our first guess at the number for "no preference" was wrong, so every profile claimed a contrast preference nobody had given it. Walking the values one at a time, 1 came back `less`, 0 `more` and 3 `custom`, which leaves 2 for no preference. The colour scheme we proved in both directions: forced light against a dark Mac gave light, and forced dark against a light one gave dark. (We made the Mac light for that test by setting a key on the launcher bundle, not by changing the owner's desktop.)

Measured with a control at both ends, one fresh profile per row:

```
control          css scheme=dark  motion=reduce         hints dark / reduce
all three set    css scheme=light motion=no-preference  hints light / no-preference
control again    css scheme=dark  motion=reduce         hints dark / reduce

```

## The same fault on another switch

`--blink-settings` was not the last time. Later, one pasted `--disable-features` replaced the whole list of features Mosaic turns off, for the same reason: the comment naming the hazard sat in one file and the line that broke it in another. That case, and how the launcher now merges set-valued switches, is in [one pasted --disable-features deleted all of ours](https://mosaicbrowser.com/blog/disable-features-merge).

If you pass `--blink-settings` to Chrome yourself, put every key in one switch and verify the result in the page: read `matchMedia('(prefers-color-scheme: dark)')`, not the command line. Why a value shared by every profile on one machine matters more than an odd value on one, is in [fingerprint consistency](https://mosaicbrowser.com/glossary/fingerprint-consistency). How Tesseract Chrome receives every one of these values at launch is on the [engine page](https://mosaicbrowser.com/features/engine).

## Questions

### What does the --blink-settings flag do in Chrome?

It sets values in Blink's own settings at launch, as comma-separated key=value pairs. We use it for the pointer and hover types media queries are computed from, and for colour scheme, reduced motion, reduced transparency and contrast preferences.

### Can I pass --blink-settings twice?

Not usefully. The switch is last-wins per process, so the second copy replaces the first instead of adding to it. Put every key in one --blink-settings.

### How do I force dark mode with --blink-settings?

preferredColorScheme takes Blink's enum, where 0 is dark and 1 is light. We confirmed both directions: forced light on a dark Mac gave light, and forced dark on a light one gave dark.

### Does --blink-settings change the Sec-CH-Prefers headers?

Yes, in our measurements. Setting the colour scheme and reduced motion moved both the CSS media queries and the Sec-CH-Prefers-Color-Scheme and Sec-CH-Prefers-Reduced-Motion request headers.

## Related

[One pasted --disable-features deleted all of ours](https://mosaicbrowser.com/blog/disable-features-merge): Chromium reads only the last --disable-features on its command line. One extra flag silently re-enabled everything we turn off, so now we merge them.

[An anti-detect browser with its own Chromium engine](https://mosaicbrowser.com/features/engine): Mosaic is an anti-detect browser with its own Chromium engine, Tesseract Chrome: stock Chromium source, with fingerprint values changed inside the engine.

[Fingerprint consistency: values that describe one machine](https://mosaicbrowser.com/glossary/fingerprint-consistency): Fingerprint consistency is whether every value a browser reports could be true of one real computer, on one network, on every visit. Scanners test exactly that.

[Do Chrome profiles have different fingerprints?](https://mosaicbrowser.com/guides/do-chrome-profiles-have-different-fingerprints): No. Chrome profiles do not have different fingerprints: they split cookies and history, but each one reports the same GPU, screen, fonts, timezone and IP.

[Client hints fingerprinting: what Sec-CH-UA headers give away](https://mosaicbrowser.com/glossary/client-hints-fingerprinting): Client hints fingerprinting reads the Sec-CH-UA headers and navigator.userAgentData, then checks them against the User-Agent and the rest of the browser.







[Canvas noise is a function of colour, not place](https://mosaicbrowser.com/blog/canvas-noise-by-colour): Canvas noise consistent across reads has to key on colour: keyed on position, one drawing at two offsets differed by 76 bytes. Keyed on colour, 8 of 8 passed.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
