Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fzipp/vga
VGA 256-color default palette
https://github.com/fzipp/vga
256-colors color color-palette go golang mode13h palette retro-graphics vga
Last synced: about 1 month ago
JSON representation
VGA 256-color default palette
- Host: GitHub
- URL: https://github.com/fzipp/vga
- Owner: fzipp
- License: bsd-3-clause
- Created: 2020-01-22T04:44:24.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T22:32:46.000Z (11 months ago)
- Last Synced: 2024-10-16T03:44:51.130Z (3 months ago)
- Topics: 256-colors, color, color-palette, go, golang, mode13h, palette, retro-graphics, vga
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vga
The VGA 256-color [default palette](https://en.wikipedia.org/wiki/Video_Graphics_Array#Color_palette)
for Go. It can be used as a [color.Palette](https://golang.org/pkg/image/color/#Palette)
from the standard library, e.g. to create an [image.Paletted](https://golang.org/pkg/image/#Paletted).![VGA 256-color default palette](demo/vga-palette-image/vga256_palette.png?raw=true "The VGA 256-color default palette")
Add it to a module as a dependency via:
```
go get github.com/fzipp/vga
```## Example usage
```go
package mainimport (
"image""github.com/fzipp/vga"
)func main() {
img := image.NewPaletted(image.Rect(0, 0, 320, 200), vga.DefaultPalette)
// ...
}
```