4bit Terminal Color Scheme Designer
- Go to https://ciembor.github.io/4bit.
- Design your terminal look.
- Click
Download Schemebutton and select the format of configuration file.
-
ATerm, Urxvt, Rxvt, XTerm and other libXt terminals: Copy the generated text to
~/.Xresourcesfile (you may have to create it) and runxrdb ~/.Xresources. -
Gnome Terminal, Guake: Save the generated script into
set_colors.sh, make this file executable withchmod +x set_colors.sh, and run it with./set_colors.sh. Alternatively copy generated lines directly into your shell. -
XFCE4 Terminal: Save file as
~/.local/share/xfce4/terminal/colorschemes/4bit.schemeand choose it in terminal preferences. -
Konsole and Yakuake: Put the generated file to
~/.kde/share/apps/konsole/NAME-OF-SCHEME.colorschemeand restart the terminal. -
iTerm2 for Mac: Create a file
~/NAME-OF-SCHEME.itermcolorswith the generated XML content and load it with theLoad Presets...button underiTerm2 / Preferences / Profiles / <Your Profile> / Colors. -
Putty: Save the generated file with
.regextension and double click it. -
Terminator: Copy lines within the
[profiles]section of the generated configuration file to~/.config/terminator/config. -
Alacritty: Put the generated file to
~/.config/alacritty/alacritty.yml. -
Mintty: Copy the colors and save them in
~/.minttyrc. -
Other terminals: Generate one of the supported formats and copy hex values into the configuration file, preferences panel, or import tool of your terminal.
This app is built with Vue 3, Vite and Pinia.
Most of the UI is now regular Vue components. The remaining legacy part is the color wheel used in Advanced, which is wrapped in Vue but still powered by the old jQuery plugin.
GitHub Pages deployments now run from GitHub Actions after npm test and npm run build pass on master.
Use Node 24.15.0 from .nvmrc before installing dependencies or running local checks.
Useful commands:
- Install dependencies with
npm install - Start the dev server with
npm run dev - Build production assets with
npm run build - Preview the production build with
npm run preview - Run the test suite with
npm test - Measure unit-test coverage with
npm run test:coverage - Run browser smoke tests with
npm run test:e2e - Install the Playwright browser with
npm run test:e2e:install - Refresh the README coverage badge with
npm run coverage:badge - Run lint fixes with
npm run lint
Playwright notes:
- E2E tests live in
tests/e2e. - The Playwright config starts Vite automatically on
127.0.0.1:4173. - If the bundled browser causes local issues, you can try an installed browser with
PLAYWRIGHT_CHANNEL=chrome npm run test:e2e. - Current smoke coverage focuses on URL hydration, advanced option changes, share links, and the download dialog.
Project structure:
src/domain- pure scheme rules, defaults, color naming, and color-mode logicsrc/application- synchronization/use-case layer that applies domain logic to app statesrc/infrastructure- URL/query codecs, export serializers, browser sync, and wrapped legacy vendor codesrc/presentation- Vue components, Pinia stores, fonts, and stylespublic- static assets copied to the final build, including images and SEO files
To add support for a new terminal:
- Add a serializer in
src/infrastructure/serialization/scheme-exports/, following the existingserialize...functions there. - Reuse helpers from
src/infrastructure/serialization/scheme-exports/shared.jswhen the target format maps the standard 16-color palette, foreground, or background. - Register the new serializer in
src/infrastructure/serialization/scheme-exporters.js: add it toEXPORT_BUILDERS, then add a matching entry toSCHEME_DOWNLOADSwithid,buttonId,text,linkLabel,downloadName, andmimeType. - Update the user-facing list in the
For userssection above with short installation instructions for the new terminal. - Extend
tests/infrastructure/serialization/scheme-exporters.test.js: keep the generic “all formats build a blob” coverage, and add at least one format-specific assertion that checks the actual output structure or color mapping. - Verify locally with
npm test,npm run build, and, if you touched test scope or reporting,npm run test:coverage.
The download dialog reads SCHEME_DOWNLOADS directly, so after registration the new export should appear automatically unless you want extra UI changes.
npm run test:coverage writes HTML, LCOV, and JSON summary reports to coverage/.
The coverage badge above is generated from the line coverage in coverage/coverage-summary.json by npm run coverage:badge.
Coverage is measured for src/**/*.js, excluding src/main.js and the vendored jQuery color picker wrapper in src/infrastructure/vendor.
Maciej Ciemborowicz
- https://maciej-ciemborowicz.eu
- https://twitter.com/ciembor
- https://linkedin.com/in/maciej-ciemborowicz
Stefan Wienert
Victor Hugo Borja
David 'vidister' Weber
