Lost Colors Mac OS

broken image


TIP On a Mac with a wide color display, you can use the standard color panel to select and preview P3 colors and compare them with sRGB colors. System Colors macOS offers a range of standard system colors that automatically adapt to vibrancy (see Translucency and Vibrancy ) and changes in accessibility settings like Increase contrast and Reduce. Aside from picking a color that better suits your preferences, changing the highlight color can also be helpful in conjunction with the Increase Contrast option in Mac OS X as well as Dark Mode to make user interface elements a bit obvious in modern versions of the Mac operating system. When I worked on Mac OS X in the lab I was able to get the terminal colors from using Terminal (rather than X11) and then editing the profile (from the Mac menu bar). The interface is a bit odd on the colors, but you have to set the modified theme as default. Further settings worked by editing.bashrc.

Today is the 20th anniversary of the release of Mac OS X. I wrote a bit about it in my Macworld column this week, and also put together a little Mac OS X timeline.

I've written a lot about Mac OS X over the years. Compiling that timeline reminded me of that. I was a features editor at Macworld when Apple began shipping OS X precursors, and so I edited most of our early coverage. Beginning with Mac OS X 10.1, I wrote most of Macworld's big feature stories covering each release.

I've lived in the same house since 1999, so I have spent many springs and summers sitting out in my yard under our redwood tree writing and editing articles about Mac OS X, OS X, and now macOS.

How many? This many:

  • OS X Prehistory (compiled by me from multiple Macworld features)

Wow, that's a lot of operating-system releases. Here's to the next uncountable number of them.

(While I wrote shorter reviews for Macworld, John Siracusa was always reviewing OS X at length for Ars Technica. Here's a list of all his reviews.)

If you appreciate articles like this one, support us by becoming a Six Colors subscriber. Subscribers get access to an exclusive podcast, members-only stories, and a special community.

Okay, so I just spent the better part of 2 hours bashing my head into a wall trying to get ls to color properly. If you're not with me now, probably skip the rest of this post as it's aimed at my geek followers.
In a hurry? I'll recap my solution in the summary.

Lost Colors Mac Os X

Okay, so I'm browsing around in my terminal when I run `ls /dev`. Turns out that directory is full of files of type ‘block special character' and ‘character special file'. Well, it just so happens that my color scheme that I've struggled a lot with shows these as grey text on a yellow or light blue background, respectively. The net is that the files are totally unreadable.
So, I of course try to fix this, find my entry for LS_COLORS in my .zshrc file, and away I go … or not. First of all, I've never editing the LS_COLORS before, I've always just stolen one from somewhere else. Here's what I had:
Looks great! Except that somewhere in that mess are a couple of numbers messing up my color scheme. So, first up: how does that work? The extensions are kind of easy to reason out, but then there are some special, two-letter patterns at the beginning. Well, ‘bd' is the type I was looking for (the ‘block special character'). I figured that out after finding this.
Oh, and backing up for a minute, I knew the offending files' types by looking up the first character of ‘ls -l'. Here's the section of the ls man page for reference:
So, as an example, both these entries are diretories, wich you can tell from teh first character:
Lost Colors Mac OS
Anyway, back to the frustrat–err, learning experience. So, I start mucking around with the LS_COLORS variables, and can't get changes to take. I progressively make more and more drastic changes, open a new shell, only to see that the colorscheme remains the same.
An hour later, I'm now discovering a new-fangled os x style of color codes, which really just looks like a glob of letters:
Well, how to set this all up is in the ls man pages, but nothing seems to be working for me. Here's the relevant section from the ls man page:
Okay, so, looks like I have all the pieces, but I'm still really struggling when I had the ‘aha' moment — I'm using screen. screen doesn't reevaluate terminal colors each time you run zsh the way a terminal does. I got onto this line of thought after reading an article from macworld.
Once I went back to a raw terminal to test my changes, I was good to go. When I restarted screen, it picked up my colors from the terminal, and now I'm good.
I ended up using pretty normal colors for the file types that were giving me problems:
Lost Colors Mac OS
Anyway, back to the frustrat–err, learning experience. So, I start mucking around with the LS_COLORS variables, and can't get changes to take. I progressively make more and more drastic changes, open a new shell, only to see that the colorscheme remains the same.
An hour later, I'm now discovering a new-fangled os x style of color codes, which really just looks like a glob of letters:
Well, how to set this all up is in the ls man pages, but nothing seems to be working for me. Here's the relevant section from the ls man page:
Okay, so, looks like I have all the pieces, but I'm still really struggling when I had the ‘aha' moment — I'm using screen. screen doesn't reevaluate terminal colors each time you run zsh the way a terminal does. I got onto this line of thought after reading an article from macworld.
Once I went back to a raw terminal to test my changes, I was good to go. When I restarted screen, it picked up my colors from the terminal, and now I'm good.
I ended up using pretty normal colors for the file types that were giving me problems:

My zshrc is almost completely platform independent, but I doubt this is very portable. Maybe I'll come back to it.

Lost Colors Mac Os Catalina

Summary

So, inclusion:

Mac Os Catalina

  • Exit screen before messing with colors
  • Read the ls man page to make sure that you're:
    • changing the correct variable (LSCOLORS in Mac OS X)
    • representing your desired colors in the desired format

As always, you can find my current shell setup files on github.

About softwaregravy

Mac Os Download

Software Engineer, aspiring financial guru, and entrepreneur; all mixed with a bit of awesome.
This entry was posted in Uncategorized and tagged liux, lscolors, ls_colors, mac, os x, shell, zshrc. Bookmark the permalink.




broken image