We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dd1486 commit 7b83c42Copy full SHA for 7b83c42
1 file changed
library/color_group/color_group.rb
@@ -0,0 +1,18 @@
1
+java_import Java::Monkstone::ColorUtil
2
+
3
+class ColorGroup
4
+ attr_reader :web_colors, :pcolors
5
+ def initialize(web)
6
+ @web_colors = web
7
+ @pcolors = ColorUtil.web_array(web)
8
+ end
9
10
+ def shuffle
11
+ @pcolors = ColorUtil.web_array(web_colors.shuffle)
12
13
14
+ def shuffle!
15
+ web_colors.shuffle!
16
+ @pcolors = ColorUtil.web_array(web_colors)
17
18
+end
0 commit comments