Margrete RPC

color

attributeCOLOR_VALUE_TO_PROTO
= {ColorValue.DEFAULT: Color.DEFAULT, ColorValue.RED: Color.RED, ColorValue.ORANGE: Color.ORANGE, ColorValue.YELLOW: Color.YELLOW, ColorValue.GREEN: Color.GREEN, ColorValue.SKY: Color.SKY, ColorValue.BLUE: Color.BLUE, ColorValue.VIOLET: Color.VIOLET, ColorValue.PINK: Color.PINK, ColorValue.WHITE: Color.WHITE, ColorValue.BLACK: Color.BLACK, ColorValue.GRASS: Color.GRASS, ColorValue.SKY_BLUE: Color.SKY_BLUE, ColorValue.COBALT_BLUE: Color.COBALT_BLUE, ColorValue.PURPLE: Color.PURPLE, ColorValue.NONE: Color.NONE}
attributeCOLOR_VALUE_FROM_PROTO
= {value: key for key, value in (COLOR_VALUE_TO_PROTO.items())}
attribute__all__
= ['Color', 'ColorLike', 'ColorValue', 'color_from_value', 'color_value_from_proto', 'color_to_value']
funccolor_from_value(value) -> Color | int

Map a wire integer to a :class:Color, or pass it through if unrecognised.

paramvalueint

Returns

margrete_rpc.chart.notes.color.Color | int
funccolor_value_from_proto(value) -> ColorValue | int

Map a wire integer to a named :class:ColorValue, or pass it through if unrecognised.

paramvalueint

Returns

margrete_rpc.chart.notes.color.ColorValue | int
funccolor_to_value(value) -> int

Convert a :data:ColorLike (enum, string, or int) to its wire integer code.

paramvalueColorLike | int

Returns

int