Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 main

import (
"image"

"github.com/fzipp/vga"
)

func main() {
img := image.NewPaletted(image.Rect(0, 0, 320, 200), vga.DefaultPalette)
// ...
}
```