From a980ebac3f1272e453338f41f2fdffe6c3bd0bb4 Mon Sep 17 00:00:00 2001 From: "Eevee (Alex Munroe)" Date: Wed, 28 Aug 2013 18:25:42 -0700 Subject: Make rgb() reset the alpha channel. rgba() accepts percentage alpha. --- scss/functions/core.py | 6 +++--- 1 file 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) -- cgit v1.2.1