// GetColorPalette returns the color palette for the chart.
431305
func (sbc StackedBarChart) GetColorPalette() ColorPalette {
	if sbc.ColorPalette != nil {
		return sbc.ColorPalette
	}
	return AlternateColorPalette
}
379272
func getPartialColor(foreground bool, letter uint8) string {
	var partialBytes bytes.Buffer

	if foreground && letter == 'x' {
		partialBytes.WriteString("0;")
	} else if !foreground && letter != 'x' {
		partialBytes.WriteString(";")
	}

	if foreground && letter >= 97 && letter <= 122 {
		partialBytes.WriteString("0;")
	} else if foreground && letter >= 65 && letter <= 90 {
		partialBytes.WriteString("1;")
	}

	if letter == 'a' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgBlack))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgBlack))
		}
	} else if letter == 'b' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgRed))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgRed))
		}
	} else if letter == 'c' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgGreen))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgGreen))
		}
	} else if letter == 'd' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgBrown))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgBrown))
		}
	} else if letter == 'e' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgBlue))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgBlue))
		}
	} else if letter == 'f' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgMagenta))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgMagenta))
		}
	} else if letter == 'g' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgCyan))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgCyan))
		}
	} else if letter == 'h' {
		if foreground {
			partialBytes.WriteString(strconv.Itoa(colorFgWhite))
		} else if !foreground {
			partialBytes.WriteString(strconv.Itoa(colorBgWhite))
		}
	} else if letter == 'A' {
		partialBytes.WriteString(strconv.Itoa(colorFgBlack))
	} else if letter == 'B' {
		partialBytes.WriteString(strconv.Itoa(colorFgRed))
	} else if letter == 'C' {
		partialBytes.WriteString(strconv.Itoa(colorFgGreen))
	} else if letter == 'D' {
		partialBytes.WriteString(strconv.Itoa(colorFgBrown))
	} else if letter == 'E' {
		partialBytes.WriteString(strconv.Itoa(colorFgBlue))
	} else if letter == 'F' {
		partialBytes.WriteString(strconv.Itoa(colorFgMagenta))
	} else if letter == 'G' {
		partialBytes.WriteString(strconv.Itoa(colorFgCyan))
	} else if letter == 'H' {
		partialBytes.WriteString(strconv.Itoa(colorFgWhite))
	}

	return partialBytes.String()
}
348136
func getChartData(data *DataTable, index int) (out [][]float64) {
	for _, r := range data.rows {
		out = append(out, []float64{r[0], r[index]})
	}

	return
}
810446
func getColorLevel(level string) string {
	level = strings.ToUpper(level)
	switch level {
	case "TRAC":
		return fmt.Sprintf("\033[%dm%s\033[0m", Blue, level)
	case "ERRO":
		return fmt.Sprintf("\033[%dm%s\033[0m", Red, level)
	case "WARN":
		return fmt.Sprintf("\033[%dm%s\033[0m", Magenta, level)
	case "SUCC":
		return fmt.Sprintf("\033[%dm%s\033[0m", Green, level)
	default:
		return level
	}
}
81071
func (c *brokerTemplateInstances) Get(name string, options v1.GetOptions) (result *template.BrokerTemplateInstance, err error) {
	result = &template.BrokerTemplateInstance{}
	err = c.client.Get().
		Resource("brokertemplateinstances").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
240707
func (r Billing_Order_Item) GetPreset() (resp datatypes.Product_Package_Preset, err error) {
	err = r.Session.DoRequest("SoftLayer_Billing_Order_Item", "getPreset", nil, &r.Options, &resp)
	return
}
118950
func (item *OrderItem) ColorName() string {
	item.loadSizeVariation()
	return item.SizeVariation.ColorVariation.Color.Name
}
870708
func WmColormapWindowsGet(xu *xgbutil.XUtil,
	win xproto.Window) ([]xproto.Window, error) {

	return xprop.PropValWindows(xprop.GetProperty(xu, win,
		"WM_COLORMAP_WINDOWS"))
}
555471
func getColor(color string) string {
	var colorcode string

	if value, ok := colors[color]; ok {
		colorcode = value
	} else {
		colorcode = colors["default"]
	}

	return colorcode
}
1017755
func ColorTable(target uint32, internalformat uint32, width int32, format uint32, xtype uint32, table unsafe.Pointer) {
	C.glowColorTable(gpColorTable, (C.GLenum)(target), (C.GLenum)(internalformat), (C.GLsizei)(width), (C.GLenum)(format), (C.GLenum)(xtype), table)
}
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
}
515741
func (palette *Palette) Free() {
	C.SDL_FreePalette((*C.SDL_Palette)(unsafe.Pointer(palette)))
}
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
}
474169
func (pgb *ChainDB) getChartData(data map[string]*dbtypes.ChartsData,
	chartT string) *dbtypes.ChartsData {
	cData := data[chartT]
	if cData == nil {
		cData = new(dbtypes.ChartsData)
	}
	return cData
}
616783
func Magenta(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.Magenta()
	}
	return value{value: arg, color: MagentaFg}
}
459662
func (s *Syslog) GetDisplayColor(level log.Level) ansi.EscSeq {
	return s.colors[level]
}
478247
func (palette *Palette) SetColors(colors []Color) error {
	if colors == nil {
		return nil
	}
	var ptr *C.SDL_Color
	if len(colors) > 0 {
		ptr = (*C.SDL_Color)(unsafe.Pointer(&colors[0]))
	}

	r := C.SDL_SetPaletteColors((*C.SDL_Palette)(unsafe.Pointer(palette)),
		ptr, 0, C.int(len(colors)))
	if r != 0 {
		return GetError()
	}
	return nil
}