 
       # CMYK
       else if color.length is 4
-        color = (part / 100 for part in color)    
-    
+        color = (part / 100 for part in color)
+
       return color
-      
+
     return null
 
   _setColor: (color, stroke) ->

    else
      space = if color.length is 4 then 'DeviceCMYK' else 'DeviceRGB'
      @_setColorSpace space, stroke
      
      color = color.join ' '
      @addContent "#{color} #{op}"
    
    return yes
    
  _setColorSpace: (space, stroke) ->
    op = if stroke then 'CS' else 'cs'
    @addContent "/#{space} #{op}"

  fillColor: (color, opacity = 1) ->
    set = @_setColor color, no
    @fillOpacity opacity if set
    
    # save this for text wrapper, which needs to reset 
    # the fill color on new pages
    @_fillColor = [color, opacity]
    return this

  strokeColor: (color, opacity = 1) ->
    set = @_setColor color, yes
    @strokeOpacity opacity if set
    return this
     
  opacity: (opacity) ->
     @_doOpacity opacity, opacity
     return this
     
  fillOpacity: (opacity) ->
     @_doOpacity opacity, null
     return this


     @page.ext_gstates[name] = dictionary
     @addContent "/#{name} gs"

  linearGradient: (x1, y1, x2, y2) ->
    return new PDFLinearGradient(this, x1, y1, x2, y2)

  radialGradient: (x1, y1, r1, x2, y2, r2) ->
    return new PDFRadialGradient(this, x1, y1, r1, x2, y2, r2)

namedColors =
  aliceblue: [240, 248, 255]
  antiquewhite: [250, 235, 215]
