Class: HexaPDF::Content::ColorSpace::DeviceCMYK::Color
- Inherits:
-
Object
- Object
- HexaPDF::Content::ColorSpace::DeviceCMYK::Color
- Includes:
- ColorUtils
- Defined in:
- lib/hexapdf/content/color_space.rb
Overview
A color in the DeviceCMYK color space.
See: PDF1.7 s8.6.4.4
Instance Method Summary collapse
-
#color_space ⇒ Object
Returns the DeviceCMYK color space module.
-
#components ⇒ Object
Returns the CMYK color as an array of normalized color values.
-
#initialize(c, m, y, k) ⇒ Color
constructor
Initializes the color with the
c
(cyan),m
(magenta),y
(yellow) andk
(black) components.
Methods included from ColorUtils
Constructor Details
#initialize(c, m, y, k) ⇒ Color
Initializes the color with the c
(cyan), m
(magenta), y
(yellow) and k
(black) components.
Each argument has to be a float between 0.0 and 1.0.
351 352 353 354 355 356 |
# File 'lib/hexapdf/content/color_space.rb', line 351 def initialize(c, m, y, k) @c = c @m = m @y = y @k = k end |
Instance Method Details
#color_space ⇒ Object
Returns the DeviceCMYK color space module.
359 360 361 |
# File 'lib/hexapdf/content/color_space.rb', line 359 def color_space DeviceCMYK::DEFAULT end |
#components ⇒ Object
Returns the CMYK color as an array of normalized color values.
364 365 366 |
# File 'lib/hexapdf/content/color_space.rb', line 364 def components [@c, @m, @y, @k] end |