Sha256: ee62f48f4781cbed9c71f4dd5fee8be3cde93dc1081c728e93a690d38e7ab7d6
Contents?: true
Size: 588 Bytes
Versions: 2
Compression:
Stored size: 588 Bytes
Contents
# frozen_string_literal: true # The <code>:color</code> attribute can give a block of text a default color, # in RGB hex format or 4-value CMYK. require_relative '../example_helper' filename = File.basename(__FILE__).gsub('.rb', '.pdf') Prawn::ManualBuilder::Example.generate(filename) do text 'Default color is black' move_down 25 text 'Changed to red', color: 'FF0000' move_down 25 text 'CMYK color', color: [22, 55, 79, 30] move_down 25 text( "Also works with <color rgb='ff0000'>inline</color> formatting", color: '0000FF', inline_format: true ) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
prawn-2.4.0 | manual/text/color.rb |
prawn-2.3.0 | manual/text/color.rb |