Documentation ¶
Index ¶
- Constants
- Variables
- func AmpColor(color uint32, ampLevel uint32) uint32
- func Contains(s []uint32, e uint32) bool
- func GetSineVals(ledCount int, floatBeat float64, period int) (sineVals map[int]int)
- func HeatColor(temperature uint32) (uint32, uint32, uint32)
- func Make(r uint32, g uint32, b uint32, w uint32) uint32
- func MkColorWeight(color1 uint32, color2 uint32, weight float64) uint32
- func MultiplyColor(color uint32, multiplier float64) uint32
- func PrintColor(color uint32)
- func ScaleMotion(x, y, z float64) uint32
- func SineScale(weight float64) float64
- type Color
- type ColorPalette
- type ColorWeight
Constants ¶
View Source
const ( PI_FACTOR = math.Pi / 2. PURPLE_STREAK = iota COLOR_STREAKS FAST_COLOR_STREAKS SOUND_COLOR_STREAKS FILL_RED SLOW_EQUALIZE FILL_EQUALIZE EQUALIZE STANDARD FLICKER AUDIO NUM_MODES )
View Source
const ( SINE_AMPLITUDE = 127 SINE_SHIFT = 127 )
Variables ¶
View Source
var ( TrueBlue = trueBlue TrueRed = Make(255, 0, 0, 0) TrueWhite = Make(0, 0, 0, 255) // special color to tell beatboxer an active beat is occurring ActiveBeatPurple = Make(127, 127, 0, 127) Colors = []uint32{ pink, trueBlue, red, lightGreen, TrueRed, deepPurple, TrueWhite, purple, mint, trueGreen, } Black = black Purple = purple Red = binary.LittleEndian.Uint32([]byte{0x00, 0x00, 0x20, 0x00}) )
Functions ¶
func GetSineVals ¶
func MultiplyColor ¶
func PrintColor ¶
func PrintColor(color uint32)
func ScaleMotion ¶
Types ¶
type ColorPalette ¶
type ColorPalette struct {
// contains filtered or unexported fields
}
func Init ¶
func Init(colors []uint32) *ColorPalette
func (*ColorPalette) Get ¶
func (c *ColorPalette) Get(weight float64) uint32
type ColorWeight ¶
type ColorWeight struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.