// RGBRuneFromColor converts a color into an RGBRune.
RGBRuneFromColor converts a color into an RGBRune.
// RGBRuneFromColor converts a color into an RGBRune .
func RGBRuneFromColor(c color.Color) RGBRune {
	r, g, b, a := c.RGBA()
	for ; a > 0xFFFF; a = a >> 8 {
	}
	alphaIndex := int(a) / (0xFFFF / len(AlphaChars))
	if alphaIndex == 5 {
		alphaIndex = 4
	}
	return RGBRune{
		r,
		g,
		b,
		AlphaChars[alphaIndex],
	}
}
func RGBRuneFromColor ( c color . Color ) RGBRune { r , g , b , a := c . RGBA ( ) for ; a > 0xFFFF ; a = a >> 8 { } alphaIndex := int ( a ) / ( 0xFFFF / len ( AlphaChars ) ) if alphaIndex == 5 { alphaIndex = 4 } return RGBRune { r , g , b , AlphaChars [ alphaIndex ] , } }
RGBRuneFromColor converts a color into an RGBRune.
RGBRuneFromColor converts a color into an RGBRune .
// NOTE Shift to 16-bits to make more predictable