class HexaPDF::Content::ColorSpace::DeviceGray::Color
A color in the DeviceGray
color space.
See: PDF1.7 s8.6.4.2
Public Class Methods
new(gray)
click to toggle source
Initializes the color with the gray
component.
The argument gray
has to be a float between 0.0 and 1.0.
# File lib/hexapdf/content/color_space.rb, line 419 def initialize(gray) @gray = gray end
Public Instance Methods
color_space()
click to toggle source
Returns the DeviceGray
color space module.
# File lib/hexapdf/content/color_space.rb, line 424 def color_space DeviceGray::DEFAULT end
components()
click to toggle source
Returns the normalized gray value as an array.
# File lib/hexapdf/content/color_space.rb, line 429 def components [@gray] end