[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/libcolor spaces.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/libcolor spaces.py |
Date: |
Tue, 15 Oct 2002 07:35:53 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/10/15 07:35:53
Modified files:
gfx/libcolor : spaces.py
Log message:
cleanup
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libcolor/spaces.py.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
Patches:
Index: gzz/gfx/libcolor/spaces.py
diff -c gzz/gfx/libcolor/spaces.py:1.11 gzz/gfx/libcolor/spaces.py:1.12
*** gzz/gfx/libcolor/spaces.py:1.11 Tue Oct 15 04:28:36 2002
--- gzz/gfx/libcolor/spaces.py Tue Oct 15 07:35:53 2002
***************
*** 117,131 ****
# The YST color space below is a linear color space with
! # a lightness component and a color plane vector whose angle and
# radius specify the hue and saturation, respectively.
# Opposite colors are 180 degrees apart.
#
! # The Y component is the CIE Y lightness (but the weights can be changed) and
# the ST-plane has the RGB primaries 120 (R = 0, G = 120, B = 240) degrees
apart
# at radius 1.
#
! # Lightness weights of the RGB primaries used in YST color space functions
Wr = 0.212671
Wg = 0.715160
Wb = 0.072169
--- 117,131 ----
# The YST color space below is a linear color space with
! # a luminance component and a color plane vector whose angle and
# radius specify the hue and saturation, respectively.
# Opposite colors are 180 degrees apart.
#
! # The Y component is the CIE Y luminance (but the weights can be changed) and
# the ST-plane has the RGB primaries 120 (R = 0, G = 120, B = 240) degrees
apart
# at radius 1.
#
! # Luminance weights of the RGB primaries used in YST color space functions
Wr = 0.212671
Wg = 0.715160
Wb = 0.072169
***************
*** 186,193 ****
def YtoL(Y):
"""
Convert linear luminance into perceptual lightness (CIE L*)
! Y: lightness between 0 and 1
! returns: luminance between 0 and 100
"""
if Y <= (216./24389):
return Y * (24389./27)
--- 186,193 ----
def YtoL(Y):
"""
Convert linear luminance into perceptual lightness (CIE L*)
! Y: luminance between 0 and 1
! returns: lightness between 0 and 100
"""
if Y <= (216./24389):
return Y * (24389./27)
***************
*** 197,204 ****
def LtoY(L):
"""
Convert perceptual lightness (CIE L*) into linear luminance
! L: luminance between 0 and 100
! returns: lightness between 0 and 1
"""
if L <= 8:
return L * (27./24389)
--- 197,204 ----
def LtoY(L):
"""
Convert perceptual lightness (CIE L*) into linear luminance
! L: lightness between 0 and 100
! returns: luminance between 0 and 1
"""
if L <= 8:
return L * (27./24389)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx/libcolor spaces.py,
Janne V. Kujala <=