Struct ::exo::Color

Overview

A specific color value.

Methods

fn new(r: u8, g: u8, b: u8, a: u8) -> Color

Creates a new Color with r,g, b, a as input channels.

fn to_rgba(self) -> Tuple

Return the values red, green, blue, aplha

Calculates white or black as font color, to display correct on the given background color

Return the color as String

Protocols

protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.