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.



468
469
470
471
# File 'lib/hexapdf/content/color_space.rb', line 468

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.



461
462
463
# File 'lib/hexapdf/content/color_space.rb', line 461

def color_space
  @color_space
end

#componentsObject (readonly)

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



465
466
467
# File 'lib/hexapdf/content/color_space.rb', line 465

def components
  @components
end