Interlisp / medley

The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
https://Interlisp.org
MIT License
376 stars 19 forks source link

Can you change what colours are used for the black and white values? #1820

Closed Kirtai closed 2 months ago

Kirtai commented 2 months ago

Hi I was wondering if it was possible to change what colours are used for the on-screen black and white display values. e.g. have Maiko map Medley's black and white to e.g. cream and very dark grey on-screen.

nbriggs commented 2 months ago

As it stands today, there's no option to change the "black" and "white" colors - Under X11, it unconditionally uses the XLib BlackPixelOfScreen() and WhitePixelOfScreen().

I know that at one point someone tried changing it to take a -fg/-bg for the colors, but it did not work properly (probably didn't find all the dependencies on black/white), so we dropped that code mod.

It's something we could go back and look at again, and it might be easier to get working with SDL.

If the reason behind the request, though, is to make the cursor stand out more -- use the X11 version (ldex) and -cursorColor xxxx (my ~/.Xresources has ldex*cursorColor: red and that works very nicely)

nbriggs commented 2 months ago

I've hacked at it for a bit, it's not clean, but this is a proof-of-concept, and only for the X11 display version. It'll take X11 named color specs for foreground and background. It uses the same colors for the main X11 window and the scroll bar etc. - every color that would have been white is now the background color, likewise all black is now foreground color. A call to (VIDEOCOLOR T) will invert ONLY the colors used in the main display, not the scrollbars. Is this the sort of thing you're looking for?

% cd medley && ./run-medley  -m 32 -g 1200x700 -sc 1200x700 -fg lightGoldenrod  -bg dimgrey loadups/full.sysout

Screenshot 2024-09-02 at 12 08 53 PM

Kirtai commented 2 months ago

I've hacked at it for a bit, it's not clean, but this is a proof-of-concept, and only for the X11 display version. It'll take X11 named color specs for foreground and background. It uses the same colors for the main X11 window and the scroll bar etc. - every color that would have been white is now the background color, likewise all black is now foreground color. A call to (VIDEOCOLOR T) will invert ONLY the colors used in the main display, not the scrollbars. Is this the sort of thing you're looking for?

Yes, that's exactly what I'm looking for, thanks :)

nbriggs commented 2 months ago

@Kirtai - If you're comfortable building the maiko code from source you could try building from the nhb-display-colors-choice branch of Interlisp/maiko -- I have both the X11 and SDL versions working reasonably, I think. Both will take a -fg/-bg (or -foreground/-background) with a color name (from the X11 color set) or a 6 hex digit color as #rrbbgg

Kirtai commented 2 months ago

Thank you, this is really nice and much appreciated :)

Only one thing is missing and that is support in the medley helper script.

nbriggs commented 2 months ago

@Kirtai Frank is going to add them to the medley helper script as known options, but in the meantime you can throw in -- followed by arbitrary options that get passed on to lde, so, for example, (from the medley directory) ./medley --sysout loadups/full.sysout -- -fg white -bg darkgray would work.

Kirtai commented 2 months ago

That worked perfectly, thank you :)

masinter commented 2 months ago

@Kirtai Just curious,..... what colors do you use and why?

Kirtai commented 2 months ago

Orignally I just wanted to make the contrast less harsh and reduce the blue a bit to make it easier on my eyes, especially at night.

Right now I have

-bg "#fff5f0" -fg "#202000"

but I need to experiment more with it to see what's comfortable in the long term. It already feels a lot better than the stark black and white.

(a terminal like amber/green plus very dark grey looks nice but I don't know how useable it'll be)

pamoroso commented 2 months ago

This feature is gaining appreciation and interest. Yesterday I shared on Mastodon a screenshot of Medley with different colors and so far it got 35 likes and 14 reshares. A comment by requiem 🏴:

this is beautiful.

and by Tomáš:

this is the most beautiful thing I’ve ever seen.

nbriggs commented 2 months ago

Implementation addressed by PR Interlisp/maiko#511