// GetColor provides a mock function with given fields:
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
}
95118
func (d *domainClient) GetBackgroundColors(ctx context.Context, args *GetBackgroundColorsArgs) (reply *GetBackgroundColorsReply, err error) {
	reply = new(GetBackgroundColorsReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "CSS.getBackgroundColors", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "CSS.getBackgroundColors", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "CSS", Op: "GetBackgroundColors", Err: err}
	}
	return
}
926606
func (v *Style) LookupColor(colorName string) (*gdk.Color, bool) {
	color_name := C.CString(colorName)
	defer cfree(color_name)
	color := new(gdk.Color)
	b := C.gtk_style_lookup_color(v.GStyle, gstring(color_name), (*C.GdkColor)(unsafe.Pointer(&color.GColor)))
	return color, gobool(b)
}
78579
func (s Style) GetFontColor(defaults ...drawing.Color) drawing.Color {
	if s.FontColor.IsZero() {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return drawing.ColorTransparent
	}
	return s.FontColor
}
119840
func (g *Group) getColor(cached bool) (common.Color, error) {
	var err error

	g.RLock()
	lastColor := g.color
	g.RUnlock()

	lights := g.Lights()

	if len(lights) == 0 {
		return lastColor, nil
	}

	colors := make([]common.Color, len(lights))

	for i, light := range lights {
		var c common.Color
		if cached {
			c = light.CachedColor()
		} else {
			c, err = light.GetColor()
			if err != nil {
				return lastColor, err
			}
		}
		colors[i] = c
	}

	g.Lock()
	g.color = common.AverageColor(colors...)
	g.Unlock()
	g.RLock()
	defer g.RUnlock()
	if !common.ColorEqual(lastColor, g.color) {
		g.Notify(common.EventUpdateColor{Color: g.color})
	}

	return g.color, nil
}
1025293
func PgGetColOrder(db XODB, schema string, index string) (*PgColOrder, error) {
	var err error

	// sql query
	const sqlstr = `SELECT ` +
		`i.indkey ` + // ::varchar AS ord
		`FROM pg_index i ` +
		`JOIN ONLY pg_class c ON c.oid = i.indrelid ` +
		`JOIN ONLY pg_namespace n ON n.oid = c.relnamespace ` +
		`JOIN ONLY pg_class ic ON ic.oid = i.indexrelid ` +
		`WHERE n.nspname = $1 AND ic.relname = $2`

	// run query
	XOLog(sqlstr, schema, index)
	var pco PgColOrder
	err = db.QueryRow(sqlstr, schema, index).Scan(&pco.Ord)
	if err != nil {
		return nil, err
	}

	return &pco, nil
}
881387
func Blue(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.Blue()
	}
	return value{value: arg, color: BlueFg}
}
291514
func Color(s, style string) string {
	if plain || len(style) < 1 {
		return s
	}
	buf := colorCode(style)
	buf.WriteString(s)
	buf.WriteString(Reset)
	return buf.String()
}
438823
func (l Level) Color(au aurora.Aurora) func(interface{}) aurora.Value {
	switch l {
	case ProtoPrio:
		return au.Cyan
	case DebugPrio:
		return au.Bold
	case InfoPrio:
		return au.Green
	case ErrorPrio:
		return au.Red
	case FatalPrio:
		return au.Magenta
	case PanicPrio:
		return nil
	case NoPrio:
		return nil
	default:
		panic("this isn't a priority")
	}
}
1171466
func GetColors(bitmap C.MMBitmapRef, x, y int) string {
	clo := GetColor(bitmap, x, y)

	return PadHex(clo)
}
953599
func (formatter *Formatter) Color(text string) string {
	var levelColor []byte
	if formatter.Event.Level >= event.Error {
		levelColor = colors.Red
	} else if formatter.Event.Level == event.Warning {
		levelColor = colors.Yellow
	} else {
		levelColor = colors.Cyan
	}
	return fmt.Sprintf("%s%s%s", levelColor, text, colors.Reset)
}
1004543
func (s Style) GetStrokeColor(defaults ...drawing.Color) drawing.Color {
	if s.StrokeColor.IsZero() {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return drawing.ColorTransparent
	}
	return s.StrokeColor
}
880468
func Color(value string) *trees.Style {
	return &trees.Style{Name: "color", Value: value}
}
638039
func Red(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.Red()
	}
	return value{value: arg, color: RedFg}
}
1053157
func GetAlternateColor(index int) drawing.Color {
	finalIndex := index % len(DefaultAlternateColors)
	return DefaultAlternateColors[finalIndex]
}
999541
func GetPixelColor(x, y int) string {
	cx := C.size_t(x)
	cy := C.size_t(y)

	color := C.get_pixel_color(cx, cy)
	gcolor := C.GoString(color)
	C.free(unsafe.Pointer(color))

	return gcolor
}
101038
func GetColorTable(target uint32, format uint32, xtype uint32, table unsafe.Pointer) {
	C.glowGetColorTable(gpGetColorTable, (C.GLenum)(target), (C.GLenum)(format), (C.GLenum)(xtype), table)
}