Top
Best
New

Posted by tosh 20 hours ago

Terminals should generate the 256-color palette(gist.github.com)
457 points | 181 commentspage 3
cyanbane 7 hours ago|
Should call it Super Terminal Entertainment System.
leni536 18 hours ago||
What I would like is HDR colors, just to access more saturated light colors. I don't want less saturated blue to make it lighter, just crank up the blue channel to 11. I still don't want brighter colors than #fff though.
hackrmn 17 hours ago|
I think your wish is self-contradicting. `#fff` is so-called _device_ colour -- a device like a LED-based display uses it directly to drive the LEDs, where `#fff` means that the red, the green and the blue channel are already "cranked to 11". The `f` here is equivalent to 11. HDR uses a different color format, I think -- exactly because `#fff` is otherwise either ambigous, or has to map to a different colour gamut -- where, for instance, `#fff` actually means the whitest white cranked up to 11, at however many nits (say 1500) the monitor may emit, which would make your "standard" or "SDR" white (per sRGB, say) that's usually has the emitted strength of around 100 nits, be somewhere at `#888` (I haven't taken into account the _curve_ implied here, at any rate I don't think it's going to be a linear relationship between nits and device primary N-bit colour numbers).

Also, `#fff` is ambigous -- if you mean device colour, then there's no brightness (nits) specified at all, it may be 200 or 2000 or 10,000. If sRGB is implied, as in `#fff in sRGB colour space` then the standard specifies 80 nits, so when you say you don't want brighter than that, then you can't have much of HDR since sRGB precludes HDR by definition (can't go brighter than 80 nits for the "whitepoint" aka white).

I think if you want HDR you need a different colour space entirely, which either has a different peak brightness, or one where the brightness is specified additionally to e.g. R, G and B primaries. But here my HDR knowledge is weak -- perhaps someone else may chime in. I just find colour science fascinating, sorry to go on a tangent here.

account42 15 hours ago|||
It's pretty obvious that gp is asking for the brightest blue to be as bright as the brightest white but no brighter.

And no, #fff is not a "device color". The syntax originates from the web where sRGB is implied ever since we had displays brighter than that.

hackrmn 10 hours ago||
It wasn't obvious to me -- I misread "blue" as "white".

`#fff` is device color, it's short for `#ffffff` which is 24-bit RGB that predates sRGB, as does true color device support. I was sending 24-bit RGB to VESA-compliant graphics cards before sRGB became a thing. `#fff` was supported by Photoshop and Macromedia products as straightforward device colour format, before sRGB was adopted by at least the latter, mind you. The use by CSS is co-incidental, not where the format was introduced.

leni536 13 hours ago|||
I meant #fff as the nominal white point, which is not the brightest white the device can produce. It's how #fff is displayed on Firefox on an otherwise HDR screen. Assuming the screen is not set to max brightness and otherwise HDR capable, it means that it's not the max brightness an individual pixel/subpixel can produce, so desaturating blue color just to make it brighter can be an unnecessary compromise only dictated by color representation in the software stack.
hackrmn 10 hours ago||
I have been blind and read your "blue" as "white", sorry. Most of my comment only makes sense in that umm, light, pardon the pun.
linhns 10 hours ago||
Nice to see Ghostty implemented it already. Feature-packed with sane defaults.
layer8 16 hours ago||
I’d also add a quantization slider that would quantize the in-between colors to less than 256 different colors; in the extreme position to just the 16 colors.
ku1ik 4 hours ago|
That would be a super-niche setting, but an interesting idea nonetheless.
therealmarv 14 hours ago||
seems this is implemented in latest iTerm2 commit https://github.com/gnachman/iTerm2/commit/39bafa8d6651865951...
foldr 7 hours ago||
> If you've spent much time in the terminal, you've probably set a custom base16 theme.

Hmm, I suspect that almost everyone who works in the terminal has never done this. I don’t really care what the colors look like, beyond choosing between whatever built in themes my terminal has. Is this really the minority experience?

kccqzy 5 hours ago|
I'm pretty sure the word "custom" refers to the act of choosing among builtin themes in the terminal. Some terminals like ghostty have hundreds builtin.
dwb 19 hours ago||
Agree, and I love how concise, yet persuasive and practical this proposal is.
evolve2k 13 hours ago||
A key critique

The article is well argued and well written, as far as I’m concerned.

What’s needed if you really want adoption is to define a term; something like 256-ex for extended. Or whatever. But folks and apps need to be able to say; we’ve implemented or we support 256-ex. Without this label is hard to drive adoption.

The heartbleed thing from a few years back best taught me this.

Good luck I hope to see broad adoption it’s a great idea.

Give it a name, better yet move the copy onto a website with the same name also and a little icon folks can add to their website if they implement this k to their terminal app.

King-Aaron 20 hours ago|
> Complex and color-heavy programs struggle with such a small palette.

Damn if only there was some other system that could be operating with that in mind

worthless-trash 18 hours ago|
I feel like you're saying one operating system does it better, but I fail to think of one.
King-Aaron 2 hours ago|||
Eh, i was being facetious, but really the point being it's kind of beyond the scope of what a terminal is for if we start plugging in full colour rendering. It is still cool.
gzread 18 hours ago|||
Windows allows you to set any pixel to any 24-bit colour.
OJFord 18 hours ago||
Not really an OS thing, you can get 24 bit 'true' colour on Linux/macOS too depending on term. Alacritty supports it, for example.
gzread 17 hours ago||
You need support from third party software such as Xorg or Weston. On Windows, it just works.
OJFord 14 hours ago|||
That's ridiculous, even if you extend third-party to mean 'not bundled', with Linux depending on distro that's just everything except the kernel anyway, it's not some 'oh my god it's not bundled it doesn't just work', that's exactly the way it does work - if you want something you install it.

(And if you don't make such an extension, what, you have no third-party graphics drivers for example?)

cap11235 17 hours ago|||
Do you think xorg and weston dont support more than 16 colors? You just run a different terminal emulator.
gzread 14 hours ago||
So I need a terminal emulator to see colours? On Windows I just open a window and put colours in it.
iamnothere 11 hours ago||
Windows doesn’t even have a framebuffer console, so you’re not exactly comparing apples to apples here. In a Linux GUI (X or Wayland) running a modern terminal you get what you are asking for. Same as Windows except that standard Windows lacks the ability to run without a GUI.
More comments...