Class: D3::Color

Inherits:
Object
  • Object
show all
Includes:
Native
Defined in:
lib/opal/d3/color.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Native

included, #initialize

Instance Attribute Details

#native ⇒ Object (readonly)

Returns the value of attribute native.



4
5
6
# File 'lib/opal/d3/color.rb', line 4

def native
  @native
end

Instance Method Details

#a ⇒ Object

Various subsets of these are valid depending on color - maybe we should properly subclass?



12
# File 'lib/opal/d3/color.rb', line 12

def a; `#@native.a` end

#b ⇒ Object



13
# File 'lib/opal/d3/color.rb', line 13

def b; `#@native.b` end

#c ⇒ Object



14
# File 'lib/opal/d3/color.rb', line 14

def c; `#@native.c` end

#g ⇒ Object



15
# File 'lib/opal/d3/color.rb', line 15

def g; `#@native.g` end

#h ⇒ Object



16
# File 'lib/opal/d3/color.rb', line 16

def h; `#@native.h` end

#l ⇒ Object



17
# File 'lib/opal/d3/color.rb', line 17

def l; `#@native.l` end

#opacity ⇒ Object



20
# File 'lib/opal/d3/color.rb', line 20

def opacity; `#@native.opacity` end

#r ⇒ Object



18
# File 'lib/opal/d3/color.rb', line 18

def r; `#@native.r` end

#s ⇒ Object



19
# File 'lib/opal/d3/color.rb', line 19

def s; `#@native.s` end