Skip to content

Instantly share code, notes, and snippets.

@KelSolaar
Created June 13, 2015 11:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KelSolaar/20019f967d015c506468 to your computer and use it in GitHub Desktop.
Save KelSolaar/20019f967d015c506468 to your computer and use it in GitHub Desktop.
RGB Luminance
# https://github.com/colour-science/colour/blob/develop/colour/models/derivation.py#L158
import colour
sRGB = colour.RGB_COLOURSPACES['sRGB']
colour.RGB_luminance_equation(sRGB.primaries, sRGB.whitepoint)
# u'Y = 0.212636821677(R) + 0.715182981841(G) + 0.0721801964814(B)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment