Choosing a color string representation

44 views
Skip to first unread message

Capi Etheriel

unread,
May 15, 2012, 1:31:47 PM5/15/12
to compas...@googlegroups.com
I'm trying to implement a mixin that generates IE-specific filters to use as a fallback for RGBA. Yet I'm finding it really hard to consistently turn rgba(0,0,0,0.7) into #00000070
Mostly because green($color) returns 0 (not 00). and rgb(0,0,0) returns 'black'.
Am I missing something?

Chris Eppstein

unread,
May 23, 2012, 11:34:33 AM5/23/12
to compas...@googlegroups.com
use the ie-hex-str($color) function that comes with sass and compass.

Chris

--
You received this message because you are subscribed to the Google Groups "Compass" group.
To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/drKI0bBb3gcJ.
To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/compass-users?hl=en.

Capi Etheriel

unread,
May 24, 2012, 11:08:44 PM5/24/12
to compas...@googlegroups.com
thanks. are there any documentation resources for this function? i'm looking in compass-style.org but found nothing.


Em quarta-feira, 23 de maio de 2012 12h34min33s UTC-3, Chris Eppstein escreveu:
use the ie-hex-str($color) function that comes with sass and compass.

Chris

On Tue, May 15, 2012 at 6:31 PM, Capi Etheriel <barra...@gmail.com> wrote:
I'm trying to implement a mixin that generates IE-specific filters to use as a fallback for RGBA. Yet I'm finding it really hard to consistently turn rgba(0,0,0,0.7) into #00000070
Mostly because green($color) returns 0 (not 00). and rgb(0,0,0) returns 'black'.
Am I missing something?

--
You received this message because you are subscribed to the Google Groups "Compass" group.
To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/drKI0bBb3gcJ.
To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-users+unsubscribe@googlegroups.com.

Chris Eppstein

unread,
May 24, 2012, 11:33:18 PM5/24/12
to compas...@googlegroups.com, compas...@googlegroups.com
Sorry, it's not well documented. We use it in our filter-gradient mixin. It takes a color and returns a string like "#AARRGGBB" but with the quotes. 

Chria

Hunt & pecked on my iPhone... Sorry if it's brief!
To view this discussion on the web visit https://groups.google.com/d/msg/compass-users/-/DIWQH2f0Sn4J.

To post to this group, send email to compas...@googlegroups.com.
To unsubscribe from this group, send email to compass-user...@googlegroups.com.

Alan Hogan

unread,
May 24, 2012, 11:37:46 PM5/24/12
to compas...@googlegroups.com
Why would Microsoft decide to put alpha before RGB…? I can only ever think of alpha being the fourth channel.

Jacob Moen

unread,
May 29, 2012, 2:29:15 AM5/29/12
to compas...@googlegroups.com
It depends.. ARGB or RGBA. Sounds like you're more familiar with the latter. But both are in use. :)
I don't know why the first is chosen, but it probably makes more sense in certain scenarios.

Alan Hogan

unread,
May 30, 2012, 12:49:47 PM5/30/12
to compas...@googlegroups.com
And I understand that… Microsoft Access, I think?… used #BBGGAA for color codes.
Reply all
Reply to author
Forward
0 new messages