package d2scenebuild

import (
	
	
	

	

	
	
	
	libcolor 
)

func ( *builder) (,  string) (d2scene.Paint, error) {
	if  == "" || strings.EqualFold(, libcolor.None) {
		return nil, nil
	}
	if libcolor.IsGradient() {
		,  := gradientPaint()
		if  != nil {
			return nil, fmt.Errorf("scene: parse %s gradient %q: %w", , , )
		}
		return , nil
	}
	 := d2themes.ResolveThemeColor(.theme, )
	if  == "" {
		return nil, fmt.Errorf("scene: %s has unknown theme color %q", , )
	}
	,  := csscolorparser.Parse()
	if  != nil {
		return nil, fmt.Errorf("scene: parse %s color %q: %w", , , )
	}
	, , ,  := .RGBA255()
	return d2scene.SolidPaint{Color: color.NRGBA{R: , G: , B: , A: }}, nil
}

func gradientPaint( string) (d2scene.Paint, error) { return scenepaint.Gradient() }