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

#==

Constructor Details

#initialize(color_space, *components) ⇒ Color

Creates a new universal color with the given components.



160
161
162
163
# File 'lib/hexapdf/content/color_space.rb', line 160

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.



157
158
159
# File 'lib/hexapdf/content/color_space.rb', line 157

def color_space
  @color_space
end

Instance Method Details

#componentsObject

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



167
168
169
# File 'lib/hexapdf/content/color_space.rb', line 167

def components
  @components
end