From 209b4240eb3646e2ed2e763fb00cfd3afd2b0e4c Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Mon, 21 Jul 2014 17:02:25 -0400 Subject: [PATCH] Added a colors example --- samples/colors.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 samples/colors.rb diff --git a/samples/colors.rb b/samples/colors.rb new file mode 100644 index 0000000..4ab5049 --- /dev/null +++ b/samples/colors.rb @@ -0,0 +1,17 @@ +require 'squib' + +Squib::Deck.new(width: 825, height: 1125, cards: 1) do + background color: :white + + y = 0 + text color: '#f00', str: '3-hex', x: 50, y: y+=50 + text color: '#f00', str: '3-hex (alpha)', x: 50, y: y+=50 + text color: '#ff0000', str: '6-hex', x: 50, y: y+=50 + text color: '#ff000099', str: '8-hex(alpha) *', x: 50, y: y+=50 + text color: '#ffff00000000', str: '12-hex', x: 50, y: y+=50 + text color: '#ffff000000009999', str: '12-hex (alpha)', x: 50, y: y+=50 + text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y+=50 + text color: [1.0, 0.0, 0.0], str: 'Array of percentages', x: 50, y: y+=50 + + save_png prefix: "colors_" +end \ No newline at end of file