Skip to content
/ ansi256 Public

RGB to terminal color palette function in Go

License

Notifications You must be signed in to change notification settings

maruel/ansi256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansi256

PkgGoDev Coverage Status

Small library and tools to calibrate and use an ANSI 256 color terminal.

For pixel emulation, it uses block codes ▒ and ░ to approximate a RGB color using two colors, one foreground and one background.

  • cmd/output256 prints all the 256 colors.
  • cmd/calibrate256 takes a PNG screenshot as input and generates a new table.
  • cmd/genpng256 takes the table and generate a new PNG, to ensure the table looks good.

For calibration, make sure your terminal is not semi-transparent before taking a screenshot.

About

RGB to terminal color palette function in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages