There's no reliable way of accomplishing this. First, Sass doesn't expose
many string operations and second, different output modes of sass will
generate different output values for colors of the same input color. If you
must, check out this gist where I show you how you can add the gsub function
to sass: https://gist.github.com/790592

It seems like you want to generate png of a certain color. If so you might
enjoy this compass plugin that does it transparently (pun intended) for you:

https://github.com/aaronrussell/compass-rgbapng

<https://github.com/aaronrussell/compass-rgbapng>Chris

On Mon, Feb 21, 2011 at 4:17 PM, Mike <mikebranderho...@gmail.com> wrote:

> I'm just new to SASS and SCSS and for now I'm blown away, this is just
> fantastic.
> Now, what I'm looking for is a way to remove the # from the color at a
> certain time.
> In a SCSS file I'm using and calculating away with a certain color ex.
> #ffffff.
> I'm using background url params to access the colored image whithout
> #.
>
> $color = #ffffff; background: url("img/#{$color}.png");
>
> How can remove #?
>
> To get this: background: url("img/ffffff.png");
>
> --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To post to this group, send email to haml@googlegroups.com.
> To unsubscribe from this group, send email to
> haml+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to