Skip to main content

Bug Tracker

Side navigation

#2281 closed enhancement (invalid)

Opened February 04, 2008 04:53PM UTC

Closed October 12, 2009 11:51PM UTC

Last modified March 15, 2012 09:56AM UTC

Support for rgba animations in jquery.color

Reported by: ericw Owned by:
Priority: minor Milestone: 1.2.3
Component: plugin Version: 1.2.2
Keywords: color, animation Cc:
Blocked by: Blocking:
Description

rgba-values in color css attributes allow firefox 3 and safari 3 to have transparent colors. it would be great to be able to animate them with jquery using the jquery.color plugin.

Attachments (1)
  • rgba.diff (3.4 KB) - added by mdawaffe February 13, 2008 05:28AM UTC.

    RGBA support for jquery.color

Change History (4)

Changed February 13, 2008 05:27AM UTC by mdawaffe comment:1

[4561] tries to partially address this but doesn't work.

In Safari 3, transparent is denoted as

'rgba(0, 0, 0, 0)'
. [4561] makes
getRGB()
aware of this, but not
getColor()
, so every transparent element in Safari 3 is treated as white in jquery.color (
getColor()
never traverses up the parent hierarchy).

The attached adds full transparency support and full RGBA support.

Transparency is detected in

getColor()
, and we don't fallback to white until
getRGB()
.

RGB colors are encoded as 3 element arrays as before, and RGBA colors (when encountered) are stored as 4 element arrays.

Conversion from RGB to RGBA colors is handled automatically (e.g. when animating from

'#00ff00'
to
'rgba(255,0,0,0.5)'
). Conversion from RGBA to RGB for the sake of browsers that don't understand RGBA is never done; it is not allowed (see note at CSS3 Color Module).

Changed April 24, 2008 11:07AM UTC by pixeline comment:2

mmh, that doesn't work for me: the element background animates to white instead of transparent even after this patch. (using firefox 2 on winxpSP2)

Changed April 22, 2009 03:14AM UTC by JosephPecoraro comment:3

A patch was added over a year ago. Its still relevant today, due to Safari/WebKit returning rgba() by default. Any reason this hasn't been updated? Or if its because things don't work properly should I take a look at it? (I personally modified mine to make it work).

Changed October 12, 2009 11:51PM UTC by dmethvin comment:4

resolution: → invalid
status: newclosed

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .