logoalt Hacker News

dspillettyesterday at 9:43 AM5 repliesview on HN

Everything should try do some basic syntax highlighting IMO. Not too much, or it just becomes a sea of formatting that doesn't help at all. It is surprising how much difference just a little splash of colour can make if it isn't overdone. If possible, always include configuration options for the user though, so those with colour-blindness issues can tweak things to their needs, those who are just fussy can make the output fit with their finely adjusted system-wide colour schemes¹, and even better, where you can, allow bold/italic/other as well as colours so that those who barely see colour at all can play too.

Of course none of this helps those using screen-readers and other tech, so make sure that all your fancy colouring & such is additive so if it is all “lost” no meaning is absolutely lost with it.

--------

[1] Some people can be very vocal about this, more so than if highlighting isn't possible at all. If you give any output formatting they'll expect you to match, or be able to be made to match, their preferred style.


Replies

Sindisiltoday at 1:11 PM

If it isn't possible to turn any syntax highlighting an the like off, I will personally look for alternatives.

Not reconfigure individual settings, turn off syntax highlighting all together.

It's not about style for me, it's about readability.

finaardyesterday at 11:15 AM

I'd recommend for every developer to get one or more colourblind friends. I have some, and regularly send them screenshots of what I'm working on to get feedback what they can see and what they can read/can't read.

They've been absolutely invaluable for making sure their kind of people can't use my apps properly.

show 6 replies
ddingusyesterday at 5:24 PM

A screen reader could use various aural means of emphasis that I bet would be as effective as this "color by pattern" idea is.

We have pitch, volume, enunciation speed, and for the voice itself the vocal formant frequency can change as can the harmonics. And that is a rich field we are good at differentiating in too.

One other screen reader idea I had upon seeing this is to use a brief sound either immediately before or after, maybe even slightly overlapping the vocalization.

30 [30 MS BEEP] CO [30 MS BEEP FOLLOWED BY A SHORT CHIRP THAT INDICATES A KNOWN ADDRESS]

Writing that out looks messy. All I can say is the sounds in my head right now make a lot more sense and would compliment the colors nicely.

PunchyHamsteryesterday at 11:47 AM

As long as you just give people list of settings for colors, they can pick as much color or monochrome as they want.

So by all means "color everything", people have different opinions on what they want colored so give them option

cubefoxyesterday at 12:23 PM

> Everything should try do some basic syntax highlighting IMO.

Interesting idea. So even syntax–highlighting natural language. Grammar highlighting, as it were. Prepositions, verbs, question marks, etc. An LLM could do it. Would it actually improve readability though? Seems likely!

show 4 replies