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

#nativeObject (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

#aObject

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

#bObject



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

def b; `#@native.b` end

#cObject



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

def c; `#@native.c` end

#gObject



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

def g; `#@native.g` end

#hObject



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

def h; `#@native.h` end

#lObject



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

def l; `#@native.l` end

#opacityObject



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

def opacity; `#@native.opacity` end

#rObject



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

def r; `#@native.r` end

#sObject



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

def s; `#@native.s` end