diff options
author | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2013-08-28 18:25:42 -0700 |
---|---|---|
committer | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2013-08-28 18:25:42 -0700 |
commit | a980ebac3f1272e453338f41f2fdffe6c3bd0bb4 (patch) | |
tree | d95629e089462414fd8cece7c12ac79fc4a8691a | |
parent | 8256ee482995d4f6ce689c7d49949c534846dab3 (diff) | |
download | pyscss-a980ebac3f1272e453338f41f2fdffe6c3bd0bb4.tar.gz |
Make rgb() reset the alpha channel. rgba() accepts percentage alpha.
-rw-r--r-- | scss/functions/core.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scss/functions/core.py b/scss/functions/core.py index 526c124..afb0afb 100644 --- a/scss/functions/core.py +++ b/scss/functions/core.py @@ -60,14 +60,14 @@ def rgba2(color, a=None): if a is None: alpha = 1 else: - alpha = a.value + alpha = _interpret_percentage(a, relto=100) return Color.from_rgb(*color.rgba[:3], alpha=alpha) @register('rgb', 1) def rgb1(color): - return color + return rgba2(color, a=Number(1)) @register('hsla', 4) @@ -95,7 +95,7 @@ def hsla2(color, a=None): @register('hsl', 1) def hsl1(color): - return color + return rgba2(color, a=Number(1)) @register('mix', 2) |