Cover for src/colors/rand.cr


Lines
2 / 2 (100.00%)

1
require "./color_value"
2
require "./color"
3

        
4
def rand(type : Colors::ColorValue.class)
5
3
  type.new rand UInt8
6
end
7

        
8
def rand(type : Colors::Color.class)
9
1
  type.new rand(Colors::ColorValue), rand(Colors::ColorValue), rand(Colors::ColorValue)
10
end
11