Beispiel #1
0
// InitColor is used to set 'color' to the specified RGB values. Values may
// be between 0 and 1000.
func InitColor(col, r, g, b int16) error {
	if C.init_color(C.short(col), C.short(r), C.short(g),
		C.short(b)) == C.ERR {
		return errors.New("Failed to set new color definition")
	}
	return nil
}
Beispiel #2
0
/* Initializes color number n to red, green, blue values. The color can then be used by InitPair to create Color Pairs*/
func InitColor(n, r, g, b int) {
	C.init_color(C.short(n), C.short(r), C.short(g), C.short(b))
}