Class: HexaPDF::Content::ColorSpace::Universal::Color

Inherits:
Object
  • Object
show all
Includes:
ColorUtils
Defined in:
lib/hexapdf/content/color_space.rb

Overview

A single color in the universal color space.

This doesn’t represent a real color but is a place holder for a color in a color space that isn’t implemented yet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ColorUtils

#==, normalize_value

Constructor Details

#initialize(color_space, *components) ⇒ Color

Creates a new universal color with the given components.



220
221
222
223
# File 'lib/hexapdf/content/color_space.rb', line 220

def initialize(color_space, *components)
  @color_space = color_space
  @components = components
end

Instance Attribute Details

#color_spaceObject (readonly)

Returns the specific Universal color space used for this color.



213
214
215
# File 'lib/hexapdf/content/color_space.rb', line 213

def color_space
  @color_space
end

#componentsObject (readonly)

Returns the componets of the universal color, i.e. all arguments provided on initialization.



217
218
219
# File 'lib/hexapdf/content/color_space.rb', line 217

def components
  @components
end