Well depends on what you call 'RGB Format'.....

If you mean you have 3 seperate string values between 0-255, then no it doesn't 
do that, but that is a really trivial one line function to write (convert to 
int and shift and add) and I don't find it strange at all that flex doesn't 
have that built in as I think it would be more normal to hold such values 
externally as hex strings rather than RGB strings.

On the other hand if you mean you have a 24Bit number then that doesnt need any 
real conversion does it.

FYI normally you declare color variables as uint in flex, you can also use 
Number but don't use int, as althougth it can theoretically hold a 24Bit value 
flex gets upset with the signed bit.

--- In [email protected], "turbo_vb" <timh...@...> wrote:
>
> Yeah, that's the one I was thinking of; not RGB to hex though.  I claim 
> temporary brain death. :)
> 
> -TH
> 
> --- In [email protected], "reflexactions" <reflexactions@> wrote:
> >
> > 
> > StyleManager.getColorName(...)
> > 
> > Does what you ask for below.
> > 
> > --- In [email protected], "turbo_vb" <TimHoff@> wrote:
> > >
> > > Never mind, I'm just way off-base on this one.
> > > 
> > > -TH
> > > 
> > > --- In [email protected], "turbo_vb" <TimHoff@> wrote:
> > > >
> > > > Isn't there a utility that converts CSS strings like "#ffffff" to 
> > > > 0xffffff?  Or "white" to 0xfffff?
> > > > 
> > > > -TH
> > > > 
> > > > --- In [email protected], Alex Harui <aharui@> wrote:
> > > > >
> > > > > 
> > > > > I have to admit I'm confused by the question.  What is the type of 
> > > > > the variable holding the RGB value?  If it is a uint, the 
> > > > > toString(16) should be the hex representation.
> > > > > 
> > > > > 
> > > > > Alex Harui
> > > > > Flex SDK Developer
> > > > > Adobe Systems Inc.<http://www.adobe.com/>
> > > > > Blog: http://blogs.adobe.com/aharui
> > > > > 
> > > > > From: [email protected] [mailto:[email protected]] 
> > > > > On Behalf Of Chet Haase
> > > > > Sent: Tuesday, September 29, 2009 4:35 PM
> > > > > To: [email protected]
> > > > > Subject: RE: [flexcoders] Re: Converting RGB to Hex color
> > > > > 
> > > > > 
> > > > > 
> > > > > Nope: HSBColor is a utility class for dealing with colors represented 
> > > > > in the HSB (Hue, Saturation, and Balance) color space. It will help 
> > > > > you convert between RGB and HSB colors, but will not help you with 
> > > > > RGB to hex string conversions.
> > > > > 
> > > > > Chet.
> > > > > 
> > > > > 
> > > > > From: [email protected] [mailto:[email protected]] 
> > > > > On Behalf Of turbo_vb
> > > > > Sent: Tuesday, September 29, 2009 1:35 PM
> > > > > To: [email protected]
> > > > > Subject: [flexcoders] Re: Converting RGB to Hex color
> > > > > 
> > > > > 
> > > > > 
> > > > > There's a utility in the sdk to convert rgb string to uint. For Flex4 
> > > > > it's mx.utils.HSBColor.
> > > > > 
> > > > > -TH
> > > > > 
> > > > > --- In 
> > > > > [email protected]<mailto:flexcoders%40yahoogroups.com>, Greg 
> > > > > Hess <flexeffect@> wrote:
> > > > > >
> > > > > > Hi All,
> > > > > >
> > > > > > I am trying to externalize our effect styles to css. However, when I
> > > > > > read in the color values getStyle() they come in RGB format and
> > > > > > GlowFilter needs Hex. I have found lots of posts of people writing
> > > > > > rgbToHex conversion function but I find it strange that this is not
> > > > > > available in the Flex SDK.
> > > > > >
> > > > > > What is the best way to do such conversions.
> > > > > >
> > > > > > Any help much appreciated,
> > > > > >
> > > > > > Greg
> > > > > >
> > > > >
> > > >
> > >
> >
>


Reply via email to