---
title: "I am sorry, but everyone is getting syntax highlighting wrong"
url: https://daily.dev/posts/i-am-sorry-but-everyone-is-getting-syntax-highlighting-wrong-qi3y4r0pn
source_url: https://tonsky.me/blog/syntax-highlighting/
type: article
source: "tonsky.me"
published: 2025-10-15T19:58:17.091Z
updated: 2026-03-15T05:30:12.767Z
tags: ["devtools", "productivity", "ui-design", "ux"]
reading_time: 9
upvotes: 101
comments: 27
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I am sorry, but everyone is getting syntax highlighting wrong

**[tonsky.me](https://daily.dev/sources/tonsky)** · 9 min read · 101 upvotes · 27 comments

## Summary

A critical examination of syntax highlighting design principles argues that most color themes fail by highlighting too many elements, making nothing stand out. The author advocates for minimalist approaches using only 3-4 memorable colors, highlighting sparse elements like constants and top-level definitions rather than ubiquitous ones like variables and keywords. Key recommendations include making comments prominent instead of grey, using background colors for light themes, and prioritizing readability over uniform color distribution. The piece demonstrates these principles through the author's Alabaster theme, showing step-by-step how reducing visual noise improves code navigation and comprehension.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tonsky.me/blog/syntax-highlighting/>

## Community discussion

Top comments from developers on daily.dev.

**@palalet** · 16 upvotes

> Yeah, but no, thank you

**@aaronschiers** · 13 upvotes

> I get the idea, but i have to disagree, it took me so long to get comfortable with the minimalistic aproach which is used by some IDEs like RustRover, sometimes i literally could not find functions because they were not highlighted, if you have a colour scheme in place, you tend to associate colours with context,
>
> my current example theme im using:
> blue - functions
> yellow - classes
> purple - keywords
> green - string values
> orange - constants
>
> for me this is much easier to follow than having to look through a white wall of plain text to identify blocks of code.

**@akkitto** · 12 upvotes

> I really can't stand italic in code. Does not make any sense to me.

**@detinho** · 9 upvotes

> That yellow

**@runecreed** · 6 upvotes

> I dont agree. From my POV the color layer adds a high-over context of what i'm looking at; like a filter that can focus attention to different elements like classes, variables, functions. Even coloring variables in the same scope differently can give a at-a-glance overview of their usage without having to go scanning for the words.
> You get used to the theme and associate the colors with context, and it's consistent so every code block becomes a familiar sight and you can roughly see what is happening without even reading the code.

## Similar posts on daily.dev

- [Everyone is getting syntax highlighting wrong – Frontend Masters Blog](https://daily.dev/posts/everyone-is-getting-syntax-highlighting-wrong-frontend-masters-blog-vh7fg1q2n) · Frontend Masters · 1 upvotes · 0 comments
- [Syntax highlighting is a waste of an information channel](https://daily.dev/posts/syntax-highlighting-is-a-waste-of-an-information-channel-0t5fatb66) · Hacker News · 3 upvotes · 1 comments
- [No-Hassle Visual Studio Code Theming: Building an Extension](https://daily.dev/posts/no-hassle-visual-studio-code-theming-building-an-extension-wyiwzoyp3) · CSS-Tricks · 2 upvotes · 0 comments
- [A few ways of specifying per-theme colours in only CSS — Chris Morgan](https://daily.dev/posts/a-few-ways-of-specifying-per-theme-colours-in-only-css-chris-morgan-yeihwzack) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#devtools](https://daily.dev/tags/devtools), [#productivity](https://daily.dev/tags/productivity), [#ui-design](https://daily.dev/tags/ui-design), [#ux](https://daily.dev/tags/ux)

[View this post on daily.dev](https://daily.dev/posts/i-am-sorry-but-everyone-is-getting-syntax-highlighting-wrong-qi3y4r0pn)
