Terminals should generate the 256-color palette · GitHub Skip to content Search Gists Search Gists Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Instantly share code, notes, and snippets. jake-stewart / color256.md Last active February 18, 2026 06:50 Show Gist options Download ZIP Star 36 ( 36 ) You must be signed in to star a gist Fork 5 ( 5 ) You must be signed in to fork a gist Embed Select an option Embed Embed this gist in your website. Share Copy sharable link for this gist. Clone via HTTPS Clone using the web URL. No results found Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/jake-stewart/0a8ea46159a7da2c808e5be2177e1783.js"></script> Save jake-stewart/0a8ea46159a7da2c808e5be2177e1783 to your computer and use it in GitHub Desktop. Embed Select an option Embed Embed this gist in your website. Share Copy sharable link for this gist. Clone via HTTPS Clone using the web URL. No results found Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/jake-stewart/0a8ea46159a7da2c808e5be2177e1783.js"></script> Save jake-stewart/0a8ea46159a7da2c808e5be2177e1783 to your computer and use it in GitHub Desktop. Download ZIP Terminals should generate the 256-color palette Raw color256.md Terminals should generate the 256-color palette from the user’s base16 theme. If you’ve spent much time in the terminal, you’ve probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them. The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette. The mainstream solution is to use truecolor and gain access to 16 million colors. But there are drawbacks: Each truecolor program needs its own theme configuration. Changing your color scheme means editing multiple config files. Light/dark switching requires explicit support from program maintainers. Truecolor escape codes are longer and slower to parse. Fewer terminals support truecolor. The 256-color palette sits in the middle with more range than base16 and less overhead than truecolor. But it has its own issues: The default theme clashes with most base16 themes. The default theme has poor readability and inconsistent contrast. Nobody wants to manually define 240 additional colors. The solution is to generate the extended palette from your existing base16 colors. You keep the simplicity of theming in one place while gaining access to many more colors. If terminals did this automatically then terminal program maintainers would consider the 256-color palette a viable choice, allowing them to use a more expressive color range without requiring added complexity or configuration files
Source: Hacker News | Original Link