// Code generated by "enumer -linecomment -type=StylePlotColorID ."; DO NOT EDIT.

package giu

import (
	"fmt"
	"strings"
)

const _StylePlotColorIDName = "plot-lineplot-fillplot-marker-outlineplot-Marker-Fillplot-error-barplot-frame-bgplot-plot-bgplot-plot-borderplot-legend-bgplot-legend-borderplot-legend-textplot-title-textplot-inlay-textplot-axis-textplot-axis-gridplot-axis-tickplot-axis-bgplot-axis-bg-hoveredplot-axis-bg-activeplot-selectionplot-crosshairs"

var _StylePlotColorIDIndex = [...]uint16{0, 9, 18, 37, 53, 67, 80, 92, 108, 122, 140, 156, 171, 186, 200, 214, 228, 240, 260, 279, 293, 308}

const _StylePlotColorIDLowerName = "plot-lineplot-fillplot-marker-outlineplot-marker-fillplot-error-barplot-frame-bgplot-plot-bgplot-plot-borderplot-legend-bgplot-legend-borderplot-legend-textplot-title-textplot-inlay-textplot-axis-textplot-axis-gridplot-axis-tickplot-axis-bgplot-axis-bg-hoveredplot-axis-bg-activeplot-selectionplot-crosshairs"

func (i StylePlotColorID) String() string {
	if i < 0 || i >= StylePlotColorID(len(_StylePlotColorIDIndex)-1) {
		return fmt.Sprintf("StylePlotColorID(%d)", i)
	}
	return _StylePlotColorIDName[_StylePlotColorIDIndex[i]:_StylePlotColorIDIndex[i+1]]
}

// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _StylePlotColorIDNoOp() {
	var x [1]struct{}
	_ = x[StylePlotColorLine-(0)]
	_ = x[StylePlotColorFill-(1)]
	_ = x[StylePlotColorMarkerOutline-(2)]
	_ = x[StylePlotColorMarkerFill-(3)]
	_ = x[StylePlotColorErrorBar-(4)]
	_ = x[StylePlotColorFrameBg-(5)]
	_ = x[StylePlotColorPlotBg-(6)]
	_ = x[StylePlotColorPlotBorder-(7)]
	_ = x[StylePlotColorLegendBg-(8)]
	_ = x[StylePlotColorLegendBorder-(9)]
	_ = x[StylePlotColorLegendText-(10)]
	_ = x[StylePlotColorTitleText-(11)]
	_ = x[StylePlotColorInlayText-(12)]
	_ = x[StylePlotColorAxisText-(13)]
	_ = x[StylePlotColorAxisGrid-(14)]
	_ = x[StylePlotColorAxisTick-(15)]
	_ = x[StylePlotColorAxisBg-(16)]
	_ = x[StylePlotColorAxisBgHovered-(17)]
	_ = x[StylePlotColorAxisBgActive-(18)]
	_ = x[StylePlotColorSelection-(19)]
	_ = x[StylePlotColorCrosshairs-(20)]
}

var _StylePlotColorIDValues = []StylePlotColorID{StylePlotColorLine, StylePlotColorFill, StylePlotColorMarkerOutline, StylePlotColorMarkerFill, StylePlotColorErrorBar, StylePlotColorFrameBg, StylePlotColorPlotBg, StylePlotColorPlotBorder, StylePlotColorLegendBg, StylePlotColorLegendBorder, StylePlotColorLegendText, StylePlotColorTitleText, StylePlotColorInlayText, StylePlotColorAxisText, StylePlotColorAxisGrid, StylePlotColorAxisTick, StylePlotColorAxisBg, StylePlotColorAxisBgHovered, StylePlotColorAxisBgActive, StylePlotColorSelection, StylePlotColorCrosshairs}

var _StylePlotColorIDNameToValueMap = map[string]StylePlotColorID{
	_StylePlotColorIDName[0:9]:          StylePlotColorLine,
	_StylePlotColorIDLowerName[0:9]:     StylePlotColorLine,
	_StylePlotColorIDName[9:18]:         StylePlotColorFill,
	_StylePlotColorIDLowerName[9:18]:    StylePlotColorFill,
	_StylePlotColorIDName[18:37]:        StylePlotColorMarkerOutline,
	_StylePlotColorIDLowerName[18:37]:   StylePlotColorMarkerOutline,
	_StylePlotColorIDName[37:53]:        StylePlotColorMarkerFill,
	_StylePlotColorIDLowerName[37:53]:   StylePlotColorMarkerFill,
	_StylePlotColorIDName[53:67]:        StylePlotColorErrorBar,
	_StylePlotColorIDLowerName[53:67]:   StylePlotColorErrorBar,
	_StylePlotColorIDName[67:80]:        StylePlotColorFrameBg,
	_StylePlotColorIDLowerName[67:80]:   StylePlotColorFrameBg,
	_StylePlotColorIDName[80:92]:        StylePlotColorPlotBg,
	_StylePlotColorIDLowerName[80:92]:   StylePlotColorPlotBg,
	_StylePlotColorIDName[92:108]:       StylePlotColorPlotBorder,
	_StylePlotColorIDLowerName[92:108]:  StylePlotColorPlotBorder,
	_StylePlotColorIDName[108:122]:      StylePlotColorLegendBg,
	_StylePlotColorIDLowerName[108:122]: StylePlotColorLegendBg,
	_StylePlotColorIDName[122:140]:      StylePlotColorLegendBorder,
	_StylePlotColorIDLowerName[122:140]: StylePlotColorLegendBorder,
	_StylePlotColorIDName[140:156]:      StylePlotColorLegendText,
	_StylePlotColorIDLowerName[140:156]: StylePlotColorLegendText,
	_StylePlotColorIDName[156:171]:      StylePlotColorTitleText,
	_StylePlotColorIDLowerName[156:171]: StylePlotColorTitleText,
	_StylePlotColorIDName[171:186]:      StylePlotColorInlayText,
	_StylePlotColorIDLowerName[171:186]: StylePlotColorInlayText,
	_StylePlotColorIDName[186:200]:      StylePlotColorAxisText,
	_StylePlotColorIDLowerName[186:200]: StylePlotColorAxisText,
	_StylePlotColorIDName[200:214]:      StylePlotColorAxisGrid,
	_StylePlotColorIDLowerName[200:214]: StylePlotColorAxisGrid,
	_StylePlotColorIDName[214:228]:      StylePlotColorAxisTick,
	_StylePlotColorIDLowerName[214:228]: StylePlotColorAxisTick,
	_StylePlotColorIDName[228:240]:      StylePlotColorAxisBg,
	_StylePlotColorIDLowerName[228:240]: StylePlotColorAxisBg,
	_StylePlotColorIDName[240:260]:      StylePlotColorAxisBgHovered,
	_StylePlotColorIDLowerName[240:260]: StylePlotColorAxisBgHovered,
	_StylePlotColorIDName[260:279]:      StylePlotColorAxisBgActive,
	_StylePlotColorIDLowerName[260:279]: StylePlotColorAxisBgActive,
	_StylePlotColorIDName[279:293]:      StylePlotColorSelection,
	_StylePlotColorIDLowerName[279:293]: StylePlotColorSelection,
	_StylePlotColorIDName[293:308]:      StylePlotColorCrosshairs,
	_StylePlotColorIDLowerName[293:308]: StylePlotColorCrosshairs,
}

var _StylePlotColorIDNames = []string{
	_StylePlotColorIDName[0:9],
	_StylePlotColorIDName[9:18],
	_StylePlotColorIDName[18:37],
	_StylePlotColorIDName[37:53],
	_StylePlotColorIDName[53:67],
	_StylePlotColorIDName[67:80],
	_StylePlotColorIDName[80:92],
	_StylePlotColorIDName[92:108],
	_StylePlotColorIDName[108:122],
	_StylePlotColorIDName[122:140],
	_StylePlotColorIDName[140:156],
	_StylePlotColorIDName[156:171],
	_StylePlotColorIDName[171:186],
	_StylePlotColorIDName[186:200],
	_StylePlotColorIDName[200:214],
	_StylePlotColorIDName[214:228],
	_StylePlotColorIDName[228:240],
	_StylePlotColorIDName[240:260],
	_StylePlotColorIDName[260:279],
	_StylePlotColorIDName[279:293],
	_StylePlotColorIDName[293:308],
}

// StylePlotColorIDString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func StylePlotColorIDString(s string) (StylePlotColorID, error) {
	if val, ok := _StylePlotColorIDNameToValueMap[s]; ok {
		return val, nil
	}

	if val, ok := _StylePlotColorIDNameToValueMap[strings.ToLower(s)]; ok {
		return val, nil
	}
	return 0, fmt.Errorf("%s does not belong to StylePlotColorID values", s)
}

// StylePlotColorIDValues returns all values of the enum
func StylePlotColorIDValues() []StylePlotColorID {
	return _StylePlotColorIDValues
}

// StylePlotColorIDStrings returns a slice of all String values of the enum
func StylePlotColorIDStrings() []string {
	strs := make([]string, len(_StylePlotColorIDNames))
	copy(strs, _StylePlotColorIDNames)
	return strs
}

// IsAStylePlotColorID returns "true" if the value is listed in the enum definition. "false" otherwise
func (i StylePlotColorID) IsAStylePlotColorID() bool {
	for _, v := range _StylePlotColorIDValues {
		if i == v {
			return true
		}
	}
	return false
}
