Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wallpaper image

Overview

Change menu bar color in macOS Big Sur

License: MIT Platforms Swift Version Twitter: @igorkulman Buy Me A Coffee

Simple utility to change macOS Big Sur menu bar color by appending a solid color or gradient rectangle to a wallpaper image.

Motivation

Big Sur changed the way the menu bar is displayed. It now adopts the color of the wallpaper, which may not always be what you would like. This utility allows you to specify the solid color or gradient of the menu bar you want to use.

Example

Imagine you have a dark wallpaper (here is mine). This dark wallpaper results in the menu bar being black even though you use the Light mode

Default menu bar color in macOS Big Sur

With this utility you can generate a new wallpaper that makes the menu bar being shown in any color you want, like a nice tone of gray from Catalina.

Custom color menu bar in macOS Big Sur

Or a custom gradient

Gradient menu bar in macOS Big Sur

Installation

Binary release

Download the latest published release and unzip the ChangeMenuBarColor.zip file. It will create a ChangeMenuBarColor executable file that you can use.

Make sure you execute all the commands from the directory where you unziped the files. So if you unziped the release to a ChangeMenuBarColor directory you need to enter it with a cd ChangeMenuBarColor before running the utility.

The binary release is not guaranteed to work as it depends on a few factors in your macOS installation. If it does not work for you, build the utility from source.

Building from source

To build the utility you need to have Xcode installed and opened at least once.

Clone the repository

git clone https://github.com/igorkulman/ChangeMenuBarColor.git

enter it

cd ChangeMenuBarColor

and run

swift build -c release

to create a ChangeMenuBarColor executable file in .build/release. Ideally copy it to the project directory with

cp .build/release/ChangeMenuBarColor .

Usage

Solid color

To set a new wallpaper file with a solid color rectangle that matches the menu bar, run

./ChangeMenuBarColor SolidColor "desired_hex_color" "optional_path_to_your_wallpaper" 

So for example

./ChangeMenuBarColor SolidColor "#CCCCCC" "/Users/igorkulman/wallpaper.jpg"

If you do not provide the wallpaper path

./ChangeMenuBarColor SolidColor "#CCCCCC"

the currently set wallpaper will be used.

Gradient

To set a new wallpaper file with a gradient rectangle at the top, run

./ChangeMenuBarColor Gradient "start_hex_color" "end_hex_color" "optional_path_to_your_wallpaper"

So for example

./ChangeMenuBarColor Gradient "#FF0000" "#00FF00" "/Users/igorkulman/wallpaper.jpg"

If you do not provide the wallpaper path

./ChangeMenuBarColor Gradient "#FF0000" "#00FF00"

the currently set wallpaper will be used.

Multiple displays

If you use multiple displays and want the wallpaper generated for all of them, add the --all-displays flag at the end of the command, so for example ./ChangeMenuBarColor Gradient "#FF0000" "#00FF00" --all-displays.

Support the project

Buy Me A Coffee

Known issues

Make sure Automatically hide and show the menu bar is disabled. This setting causes the utility to incorrectly detect the menu bar size.

Dynamic wallpapers are not supported at the moment. If you use a dynamic wallpaper the utility will convert it to a static .jpg image.

Catalina support

The utility builds and runs on Catalina but the menu bar on Catalina works in a different way that on Big Sur so the result will never be the same as on Big Sur.

Contributing

All contributions are welcomed!

Development

Use swift package generate-xcodeproj to generate a Xcode project you can use for development.

Author

License

This project is licensed under the MIT License - see the LICENSE file for details.

Comments
  • Receiving an error on Catalina

    Receiving an error on Catalina

    When I execute "swift build -c release" it receive this: error: terminated(72): LC_TERMINAL=iTerm2 SHLVL=1 SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk _=/usr/bin/swift COLORTERM=truecolor HOME=/Users/admin LC_TERMINAL_VERSION=3.4.3 TERM=xterm-256color TERM_PROGRAM=iTerm.app LANG=en_AU.UTF-8 ITERM_PROFILE=Custom Terminal LOGNAME=admin __CF_USER_TEXT_ENCODING=0x1F5:0:15 XPC_FLAGS=0x0 COLORFGBG=7;0 CPATH=/usr/local/include TERM_PROGRAM_VERSION=3.4.3 ITERM_SESSION_ID=w0t0p0:B98AD1E5-A6DF-4DA4-B992-8268C6ED976F USER=admin TERM_SESSION_ID=w0t0p0:B98AD1E5-A6DF-4DA4-B992-8268C6ED976F PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.BhijhDcIOO/Listeners OLDPWD=/Users/admin LIBRARY_PATH=/usr/local/lib XPC_SERVICE_NAME=0 PWD=/Users/admin/ChangeMenuBarColor TMPDIR=/var/folders/rt/cxkhbxq11051rn6gdmwqtgmw0000gn/T/ SHELL=/bin/bash /usr/bin/xcrun --sdk macosx --find xctest output: xcrun: error: unable to find utility "xctest", not a developer tool or in PATH

    opened by ArrowNemesis 18
  • Error when setting SolidColor on all displays

    Error when setting SolidColor on all displays

    Hi,

    I've got a triple monitor setup. It does implement the SolidColor on my main display normally, but fails to do so on my other 2 displays, throwing the following error in the terminal when using the command with --all-displays:

    Could not create graphical context for solid color image
    Could not generate new wallpaper screen 1
    
    Could not create graphical context for solid color image
    Could not generate new wallpaper screen 2
    
    help wanted 
    opened by HAL9000-cmd 16
  • Compile error

    Compile error

    I cloned the latest version and followed the instructions.

    I'm getting compile errors, starting with:

    /Users/steve/Desktop/ChangeMenuBarColor: error: manifest parse error(s): <module-includes>:1:9: note: in file included from <module-includes>:1: #import "Headers/CoreFoundation.h" ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43: #include <CoreFoundation/CFBase.h> ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:73:10: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:73: #include <Block.h>

    opened by jetpants 12
  • Change Menu Bar Color for multiple displays

    Change Menu Bar Color for multiple displays

    Any ideas to make sure the Menu Bar color is changed on all displays? Currently only changes the Menu Bar located on the Mac itself. If not, how may I set the menu bar color back to its default? Thank you in advance.

    opened by hayesref 9
  • mint run igorkulman/ChangeMenuBarColor failed

    mint run igorkulman/ChangeMenuBarColor failed

    Zakirs-MacBook-Pro:~ zakir$ mint run igorkulman/ChangeMenuBarColor 🌱 Finding latest version of ChangeMenuBarColor 🌱 Cloning ChangeMenuBarColor v1.0.1 🌱 Resolving package error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output: xcrun: error: unable to find utility "xctest", not a developer tool or in PATH 🌱 Encountered error during "swift package resolve". Use --verbose to see full output 🌱 Failed to resolve ChangeMenuBarColor v1.0.1 with SPM Zakirs-MacBook-Pro:~ zakir$

    opened by zakirsajib 8
  • Catalina MenuBar SolidColor not completely black

    Catalina MenuBar SolidColor not completely black

    Using currently set macOS wallpaper file:///System/Library/Desktop%20Pictures/Solid%20Colors/Black.png Generating sRGB IEC61966-2.1 colorspace 0 0 0 1 solid color image

    When I execute ./ChangeMenuBarColor SolidColor "#000000", I'm not getting the hex color of "#000000" I'm getting "#000001"

    opened by ArrowNemesis 6
  • Segmentation fault

    Segmentation fault

    Fails catastrophically with a seg fault (the error message is "Segmentation fault: 11") under MacOS 11.2, executed with:

    ./ChangeMenuBarColor SolidColor #CCCCCC

    opened by aholub 5
  • 'mint run igorkulman/ChangeMenuBarColor' installation failed

    'mint run igorkulman/ChangeMenuBarColor' installation failed

    Hello, now there is a little problem here when executing the second part of install mint, Hello, now there is a little problem here when executing the second part of install mint, the error message is displayed as follows:

    error: terminated(72): /usr/bin/xcrun --sdk macosx --find xctest output: xcrun: error: unable to find utility "xctest", not a developer tool or in PATH 🌱 Encountered error during "swift package resolve". Use --verbose to see full output 🌱 Failed to resolve ChangeMenuBarColor v1.0.1 with SPM

    OS: macOS Big Sur (M1)

    1647938408089

    opened by peanut0713 4
  • Changing color only works with terminal not in full screen

    Changing color only works with terminal not in full screen

    If terminal is in full screen, the app will only change the menu bar color for terminal. If you swipe to any other app, the menu bar is still the old color (in my case, the solid color before I shifted to a gradient color). In order for the color to work, the command has to be re-run when terminal is not full screened. Thanks for such a great app!

    opened by kedarabhyankar 4
  • ARGB option doesn't work as expected

    ARGB option doesn't work as expected

    When I use the new ARGB it does a transparent rectangle, but I can't see the original image underneath it... Screenshot 2021-02-07 at 16 19 59

    Is that intentional? or am I over-thinking it?

    opened by takuhii 3
  • Suggestion: Transparency Option to Menu Bar Color

    Suggestion: Transparency Option to Menu Bar Color

    Hi, Would it be possible to apply a transparency option to the app? I was think that if you applied an ALPHA value to the color specified (maybe as an additional flag)?

    ./ChangeMenuBarColor TransparentColor "desired_hex_color" "4"

    This could maybe work in 20% increments like this; 1-20% - 2-40% - 3-60% - 4-80% - 5-100%

    If you are using something like ImageMagick in the background, then this can be done like this; https://imagemagick.org/script/compose.php

    Sorry to abuse the issues function in this way...

    Cheers Darren

    enhancement good first issue 
    opened by takuhii 3
  • Failed to resolve ChangeMenuBarColor v1.0.1 with SPM

    Failed to resolve ChangeMenuBarColor v1.0.1 with SPM

    Hi. I wanted to try your app but when I run mint run igorkulman/ChangeMenuBarColor I get:

    🌱 Finding latest version of ChangeMenuBarColor
    🌱 Cloning ChangeMenuBarColor v1.0.1
    🌱 Resolving package
    error: 'github.com_igorkulman_changemenubarcolor': Invalid manifest
    /private/var/folders/n2/fy86_3m54b1fk3zkckvygpd80000gn/T/mint/github.com_igorkulman_ChangeMenuBarColor/Package.swift:4:8: error: no such module 'PackageDescription'
    import PackageDescription
           ^
    🌱 Encountered error during "swift package resolve". Use --verbose to see full output
    🌱  Failed to resolve ChangeMenuBarColor v1.0.1 with SPM
    

    Xcode is installed and I created a blank swift project just to be sure.

    I'm running macOS 12.6 on m1 mackbook pro.

    opened by gh-kdk 5
  • [Feature Request] Add Homebrew Formula

    [Feature Request] Add Homebrew Formula

    This is an awesome tool.

    As a heavy homebrew user, my first inclination to install it was brew install change-menu-bar-color

    Are you open to adding this to homebrew? I can help if you need assistance.

    help wanted 
    opened by ericpardee 1
  • Second screen wallpaper has wrong menu bar size

    Second screen wallpaper has wrong menu bar size

    My primary monitor has the proper menu bar set, but my secondary screen is always black when using the --all-displays option. I've tried every possible combination of monitor settings to make it work.

    opened by ElStempel 4
  • White line rendered on left edge of wallpaper

    White line rendered on left edge of wallpaper

    On my late-2016 13" MacBook Pro, wallpapers processed through ChangeMenuBarColor always render a single-pixel wide white line along the left edge of the wallpaper. Doesn't matter if the source image was a dynamic wallpaper or normal static image.

    I have the screen res scaled at "More Space" 1680x1050 in System Preferences (up from the native res of 1440x900).

    However on my desktop Mac running Catalina on a non-retina (native res) screen, this doesn't happen.

    Without digging into the source code, I'm not sure what causes this but it may be related to subpixel coordinate rounding?

    white-line

    Zoomed in. You can see a solid white line 1 pixel wide, then a mid-point alpha blend of 1 pixel wide next to it.

    white-line2 help wanted 
    opened by orchetect 10
  • Support for multiple changing wallpapers

    Support for multiple changing wallpapers

    I don't believe it is a feature now. I have multiple wallpapers that change randomly every minute. It would be great if it was possible to give the utility a path to a wallpapers folder. This way it wouldn't be necessary to run the command for every wallpaper separately. And also if it is possible, the utility could then change the folder in system preferences to the newly created one with adjusted wallpapers. Although that can be easily done manually so it's not a must have.

    opened by Marsellus19 3
Releases(v1.0.3)
Owner
Igor Kulman
Building mobile apps since 2011, currently suffering Xcode for iOS / Swift development.
Igor Kulman
Lock a terminal command to the efficiency or performance cores on a big.LITTLE ARM processor

CPU-Lock Lock a terminal command to the efficiency or performance cores on a big.LITTLE ARM processor (Designed for Apple Silicon). Usage Download the

BitesPotatoBacks 0 Aug 11, 2022
Mac app to change .ipa file app icons and display names

IPAEdit Mac app to change .ipa file app icon, display name, and app version to avoid updates Compatible with macOS 10.11+ Install To install either cl

Ethan Goodhart 23 Dec 28, 2022
A basic iOS app that takes input from the user, displays it, allows changing both text color and background color.

Hello-iOSApp App Description A basic iOS app that takes input from the user, displays it, allows changing both text color and background color. App Wa

null 0 Jan 8, 2022
macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support

xcframework-maker macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support. ?? Description make-xcframew

Dariusz Rybicki 312 Dec 22, 2022
A tiny macOS utility to foster sustainable OSS

SustainableOSS SustainableOSS is a status bar app for macOS that indexes the third-party dependencies your projects depend on, sorts them by usage, an

Tuist 0 Dec 14, 2021
A simple Swift utility for producing pseudolocalized strings.

Build your App UI to adapt and respond to translations, and find localization bugs!

Reece Como 2 Sep 28, 2021
Simple utility for only executing code every so often.

Rate Limit Simple utility for only executing code every so often. This will only execute the block passed for a given name if the last time it was cal

Sam Soffes 921 Nov 20, 2022
A simple utility allowing to detect Swift version at runtime.

SwiftVersionDetector SwiftVersionDetector allows you to detect Swift version at runtime. Note that detecting the Swift version of the machine on which

Alessandro Venturini 2 Dec 3, 2022
A utility that reminds your iPhone app's users to review the app written in pure Swift.

SwiftRater SwiftRater is a class that you can drop into any iPhone app that will help remind your users to review your app on the App Store/in your ap

Takeshi Fujiki 289 Dec 12, 2022
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.

ZamzamKit ZamzamKit is a Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and othe

Zamzam Inc. 261 Dec 15, 2022
A utility to generate PreviewDevice presets from the available devices

SwiftUIGen A utility to generate PreviewDevice presets from the available devices Installation Manual Go to the GitHub page for the latest release Dow

Timberlane Labs 29 Nov 14, 2022
Utility to run the SPI-Server tests as a benchmark

spi-benchmark This package comprises a simple tool to run the SwiftPackageIndex-Server tests in a loop, logging the run times. The purpose is to colle

Swift Package Index 2 Mar 13, 2022
Utility functions for validating IBOutlet and IBAction connections

Outlets Utility functions for validating IBOutlet and IBAction connections. About Outlets provides a set of functions which validate that IBOutlets ar

Ben Chatelain 129 May 2, 2022
Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX)

Mission Control Super powerful remote config utility written in Swift (iOS, watchOS, tvOS, OSX) Brought to you by Have you ever wished you could chang

appculture 113 Sep 9, 2022
Finds the .dSYM for a given binary image name and replaces its internal UUID with the given UUID.

dsymrename Given a directory with several .dSYMs, finds the .dSYM for a given binary image name and replaces its internal UUID with the given UUID. Us

Stefan Schmitt 15 Jul 17, 2022
Add “Launch at Login” functionality to your macOS app in seconds

LaunchAtLogin Add “Launch at Login” functionality to your macOS app in seconds It's usually quite a convoluted and error-prone process to add this. No

Sindre Sorhus 1.3k Jan 6, 2023
macOS system library in Swift

SystemKit A macOS system library in Swift based off of libtop, from Apple's top implementation. For an example usage of this library, see dshb, a macO

null 323 Jan 5, 2023
A macOS application displaying the thermal, voltage and current sensor values.

Sensors About A macOS application displaying the thermal, voltage and current sensor values. License Project is released under the terms of the MIT Li

Jean-David Gadina 82 Jan 3, 2023
ALO sync allows you to sync resources form an ALO endpoint to your macOS file system.

ALO sync allows you to sync resources form an ALO endpoint to your macOS file system. Prerequisites macOS 11 No support for search* No suppor

Lawrence Bensaid 2 Jan 22, 2022