struct

Egui::Color32

Inherits Struct < Value < Object

Constructors

new(r : UInt8 = 0_u8, g : UInt8 = 0_u8, b : UInt8 = 0_u8, a : UInt8 = 255_u8)
Source
rgb(r : Int, g : Int, b : Int) : Color32
Source
rgba(r : Int, g : Int, b : Int, a : Int = 255) : Color32
Source
transparent
Source

Instance methods

==(other : Color32) : Bool
Source
a=(a : UInt8)
Source
b=(b : UInt8)
Source
g=(g : UInt8)
Source
inspect(io : IO) : Nil

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
Source
mul_color(s : Float64) : Color32

Linear multiplier, alpha preserved.

Source
r=(r : UInt8)
Source