// SetBackground sets the OpenGL ClearColor to the provided color.
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)
	}
}
784964
func contextOrBackground(ctx context.Context) context.Context {
	if ctx != nil {
		return ctx
	}
	return context.Background()
}
1102631
func (p *Pattern) generateBackground() {
	var rgb, color colorful.Color

	if p.Color != "" {
		rgb, _ = colorful.Hex(p.Color)
	} else {
		hueOffset := utils.Map(utils.HexVal(p.Hash, 14, 3), 0, 4095, 0, 359)
		satOffset := utils.Map(utils.HexVal(p.Hash, 17, 1), 0, 15, -1, 1)

		if p.BaseColor == "" {
			color, _ = colorful.Hex(utils.BaseColor)
		} else {
			color, _ = colorful.Hex(p.BaseColor)
		}

		h, c, l := color.Hcl()

		h -= hueOffset
		if satOffset >= 0 {
			c += float64(satOffset)
		} else {
			c -= float64(satOffset)
		}

		rgb = colorful.Color{h, c, l}
	}

	r, g, b := int(rgb.R*105), int(rgb.G*105), int(rgb.B*150)

	args := make(map[string]interface{})
	args["fill"] = fmt.Sprintf("rgb(%v, %v, %v)", r, g, b)

	p.Svg.Rect(0, 0, "100%", "100%", args)
}
1338218
func (s *SingleInstanceHealth) SetColor(v string) *SingleInstanceHealth {
	s.Color = &v
	return s
}
835121
func (s Style) WithBackground(color Paint) Style {
	newS := s
	newS.bg = color
	newS.code = computeColorCode(newS.bg, newS.fg)
	return newS
}
489806
func (c *ConfigLocal) DoBackgroundFlushes() bool {
	if !c.Mode().BackgroundFlushesEnabled() {
		return false
	}

	c.lock.RLock()
	defer c.lock.RUnlock()
	return !c.noBGFlush
}
996519
func (s *SpheroDriver) SetBackLED(level uint8) {
	s.packetChannel <- s.craftPacket([]uint8{level}, 0x02, 0x21)
}
835795
func (opts *Options) SetMaxBackgroundCompactions(value int) {
	C.rocksdb_options_set_max_background_compactions(opts.c, C.int(value))
}
1163538
func (_m *Location) SetColor(color common.Color, duration time.Duration) error {
	ret := _m.Called(color, duration)

	var r0 error
	if rf, ok := ret.Get(0).(func(common.Color, time.Duration) error); ok {
		r0 = rf(color, duration)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
814962
func (r *myRGBAPainter) SetColor(c color.Color) {
	r.cr, r.cg, r.cb, r.ca = c.RGBA()
}
79461
func (s *BurnInDestinationSettings) SetShadowColor(v string) *BurnInDestinationSettings {
	s.ShadowColor = &v
	return s
}
1046312
func (c *Checkbox) SetFieldBackgroundColor(color tcell.Color) *Checkbox {
	c.fieldBackgroundColor = color
	return c
}
1357968
func (s *PlansListMember) SetBackupPlanArn(v string) *PlansListMember {
	s.BackupPlanArn = &v
	return s
}
57701
func (f *Fpdf) SetTextColor(r, g, b int) {
	f.setTextColor(r, g, b)
}
658102
func (b *Box) SetBorderColor(color tcell.Color) *Box {
	b.borderColor = color
	return b
}
285658
func (f *File) SetSheetBackground(sheet, picture string) error {
	var err error
	// Check picture exists first.
	if _, err = os.Stat(picture); os.IsNotExist(err) {
		return err
	}
	ext, ok := supportImageTypes[path.Ext(picture)]
	if !ok {
		return errors.New("unsupported image extension")
	}
	file, _ := ioutil.ReadFile(picture)
	name := f.addMedia(file, ext)
	rID := f.addSheetRelationships(sheet, SourceRelationshipImage, strings.Replace(name, "xl", "..", 1), "")
	f.addSheetPicture(sheet, rID)
	f.setContentTypePartImageExtensions()
	return err
}
1318637
func (s *GlobalSecondaryIndexDescription) SetBackfilling(v bool) *GlobalSecondaryIndexDescription {
	s.Backfilling = &v
	return s
}