// Color returns the color located at the given position.
182587
func (pd *PictureData) Color(at Vec) RGBA {
	if !pd.Rect.Contains(at) {
		return RGBA{0, 0, 0, 0}
	}
	return ToRGBA(pd.Pix[pd.Index(at)])
}
313104
func CheckerColor(colorA color.Color, colorB color.Color, size uint) ColorFunc {
	return func(n int, x int, y int, maxN int, maxX int, maxY int) color.Color {
		if ((uint(x)/size)+(uint(y)/size))%2 == 0 {
			return colorA
		}

		return colorB
	}
}
880468
func Color(value string) *trees.Style {
	return &trees.Style{Name: "color", Value: value}
}
167784
func (p *Image) At(x, y int) color.Color {
	return p.RGBAAt(x, y)
}
121077
func (writer *ConsoleWriter) Colored() bool {
	writer.lock.RLock()
	defer writer.lock.RUnlock()

	return writer.colored
}
1283110
func Yellow(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.Yellow()
	}
	return value{value: arg, color: YellowFg}
}
1006786
func PickColor() ColorFunc {
	ret := colorsFunc[currentColor]
	currentColor++
	if currentColor > len(colorsFunc) {
		currentColor = 0
	}
	return ret
}
638039
func Red(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.Red()
	}
	return value{value: arg, color: RedFg}
}
881387
func Blue(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.Blue()
	}
	return value{value: arg, color: BlueFg}
}
219576
func (self *FileSet) Position(idx Idx) *Position {
	position := &Position{}
	for _, file := range self.files {
		if idx <= Idx(file.base+len(file.src)) {
			offset := int(idx) - file.base
			src := file.src[:offset]
			position.Filename = file.name
			position.Offset = offset
			position.Line = 1 + strings.Count(src, "\n")
			if index := strings.LastIndex(src, "\n"); index >= 0 {
				position.Column = offset - index
			} else {
				position.Column = 1 + len(src)
			}
		}
	}
	return position
}
602174
func (l *LabelResult) GetColor() string {
	if l == nil || l.Color == nil {
		return ""
	}
	return *l.Color
}
545177
func colorToFloat32(c color.Color) float32 {
	colorR, colorG, colorB, colorA := c.RGBA()
	colorR >>= 8
	colorG >>= 8
	colorB >>= 8
	colorA >>= 8

	red := colorR
	green := colorG << 8
	blue := colorB << 16
	alpha := colorA << 24

	return math.Float32frombits((alpha | blue | green | red) & 0xfeffffff)
}
640962
func Colored(val string, color string) string {
	// 00 white 01 black 02 blue (navy) 03 green 04 red 05 brown (maroon)
	// 06 purple 07 orange (olive) 08 yellow 09 light green (lime)
	// 10 teal (a green/blue cyan) 11 light cyan (cyan) (aqua) 12 light blue (royal)
	// 13 pink (light purple) (fuchsia) 14 grey 15 light grey (silver)
	c := "01"
	switch color {
	case "white":
		c = "00"
	case "black":
		c = "01"
	case "blue":
		c = "02"
	case "green":
		c = "03"
	case "red":
		c = "04"
	case "brown":
		c = "05"
	case "purple":
		c = "06"
	case "orange":
		c = "07"
	case "yellow":
		c = "08"
	case "lime":
		c = "09"
	case "teal":
		c = "10"
	case "cyan":
		c = "11"
	case "lightblue":
		c = "12"
	case "pink":
		c = "13"
	case "grey":
		c = "14"
	case "silver":
		c = "15"
	}

	return "\x03" + c + val + "\x03"
}
330954
func (_m *Light) GetColor() (common.Color, error) {
	ret := _m.Called()

	var r0 common.Color
	if rf, ok := ret.Get(0).(func() common.Color); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(common.Color)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1289795
func PixelColor(renderer *sdl.Renderer, x, y int32, color sdl.Color) bool {
	_x := C.Sint16(x)
	_y := C.Sint16(y)
	_color := C.Uint32(gfxColor(color))
	return C.pixelColor((*C.SDL_Renderer)(unsafe.Pointer(renderer)), _x, _y, _color) == 0
}
147015
func (n *IntNode) color() llrb.Color {
	if n == nil {
		return llrb.Black
	}
	return n.Color
}
610056
func (c *Context) BlendColor(r, g, b, a float64) {
	c.Call("blendColor", r, g, b, a)
}