Skip to content

Commit

Permalink
added chroma.luminance() shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Aug 28, 2013
1 parent 39ed3a2 commit 476687b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/color.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -555,3 +555,5 @@ chroma.contrast = (a, b) ->
l2 = b.luminance()
if l1 > l2 then (l1 + 0.05) / (l2 + 0.05) else (l2 + 0.05) / (l1 + 0.05)

chroma.luminance = (color) ->
chroma.color(color).luminance()

0 comments on commit 476687b

Please sign in to comment.