// SetBGColorFunction applies the input ColorFunc to the receiving Waveform
// struct for background use.
6587
func (w *Waveform) SetBGColorFunction(function ColorFunc) error {
	return w.SetOptions(BGColorFunction(function))
}
1134668
func (rr *rasterRenderer) SetStrokeColor(c drawing.Color) {
	rr.s.StrokeColor = c
}
252681
func (dc *Context) SetRGB(r, g, b float64) {
	dc.SetRGBA(r, g, b, 1)
}
35825
func OptionInputBGColor(x Color) Option {
	return func(p *Prompt) error {
		p.renderer.inputBGColor = x
		return nil
	}
}
149235
func (w *Waveform) SetFGColorFunction(function ColorFunc) error {
	return w.SetOptions(FGColorFunction(function))
}
1173621
func (builder *Builder) RGB8BitF(r, g, b uint8) *Builder {
	return builder.Color8BitF(NewRGB8Bit(r, g, b))
}
57701
func (f *Fpdf) SetTextColor(r, g, b int) {
	f.setTextColor(r, g, b)
}
1126497
func (pattern *MeshPattern) SetCornerColorRGB(cornerNum int, red, green, blue float64) {
	C.cairo_mesh_pattern_set_corner_color_rgb(pattern.Ptr, C.uint(cornerNum), C.double(red), C.double(green), C.double(blue))
	if err := pattern.status(); err != nil {
		panic(err)
	}
}
321681
func (l *RgbLedDriver) SetRGB(r, g, b byte) error {
	l.redColor = r
	l.greenColor = g
	l.blueColor = b

	return l.On()
}
1077255
func (b *Button) SetBackgroundColorActivated(color tcell.Color) *Button {
	b.backgroundColorActivated = color
	return b
}
208713
func (c *Client) SetColor(color common.Color, duration time.Duration) error {
	return c.protocol.SetColor(color, duration)
}
814962
func (r *myRGBAPainter) SetColor(c color.Color) {
	r.cr, r.cg, r.cb, r.ca = c.RGBA()
}
249967
func (imd *IMDraw) SetColorMask(color color.Color) {
	imd.mask = pixel.ToRGBA(color)
	imd.batch.SetColorMask(imd.mask)
}
476336
func (builder *Builder) Color8BitF(c RGB8Bit) *Builder {
	return builder.With(Color8BitF(c))
}
500870
func BlendBgColor(dest *Image, c color.Color) {
	r := dest.Bounds()
	cr32, cg32, cb32, _ := c.RGBA()
	cr, cg, cb := uint8(cr32), uint8(cg32), uint8(cb32)

	var bgra BGRA
	var alpha float64
	for x := r.Min.X; x < r.Max.X; x++ {
		for y := r.Min.Y; y < r.Max.Y; y++ {
			bgra = dest.At(x, y).(BGRA)
			alpha = float64(bgra.A) / 255.0
			dest.SetBGRA(x, y, BGRA{
				B: blend(cb, bgra.B, alpha),
				G: blend(cg, bgra.G, alpha),
				R: blend(cr, bgra.R, alpha),
				A: 0xff,
			})
		}
	}
}
496233
func SetBackground(c color.Color) {
	if !engo.Headless() {
		r, g, b, a := c.RGBA()

		engo.Gl.ClearColor(float32(r)/0xffff, float32(g)/0xffff, float32(b)/0xffff, float32(a)/0xffff)
	}
}
675066
func OptionScrollbarBGColor(x Color) Option {
	return func(p *Prompt) error {
		p.renderer.scrollbarBGColor = x
		return nil
	}
}