palette2048_nes

package module
v0.0.0-...-ef193fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 1 Imported by: 1

README

go-palette2048_nes

Package palette2048_nes provides the NES color palette in the form of 256 RGBA color with 8-bits per color channel, that when used with the https://github.com/reiver/go-palette2048 package works with Go's built-in "image", "image/color", and "image/draw" packages.

Documention

Online documentation, which includes examples, can be found at: https://github.com/reiver/go-palette2048_nes

GoDoc

Example

import (
	"github.com/reiver/go-palette2048"
	"github.com/reiver/go-palette2048_nes"
)

// ...

palette := palette2048.Slice(palette2048_nes.Palette)

// ...

// Get the color at a specific index in the palette.
color := palette.Color(index)

// ...

// Get the color in the palette that is closet to a reference color.
closestColor := palette.Convert(referenceColor)

See Also

Also see:

Documentation

Overview

Package palette2048_nes provides the NES color palette in the form of 256 RGBA color with 8-bits per color channel, that when used with the https://github.com/reiver/go-palette2048 package works with Go's built-in "image", "image/color", and "image/draw" packages.

Example

Here is an example of how this package can be used:

import (
	"github.com/reiver/go-palette2048"
	"github.com/reiver/go-palette2048_nes"
)

// ...

palette := palette2048.Slice(palette2048_nes.Palette)

// ...

// Get the color at a specific index in the palette.
color := palette.Color(index)

// ...

// Get the color in the palette that is closet to a reference color.
closestColor := palette.Convert(referenceColor)

Index

Constants

This section is empty.

Variables

View Source
var Palette [palette2048.ByteSize]uint8 = [palette2048.ByteSize]uint8{}/* 256 elements not displayed */

Palette provides the NES palette.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL