4 Replies Latest reply on Jan 3, 2011 12:03 PM by Wrataxas

    How can i use this color for my Application Background ?? Screen Shot Attached

    kiran7881 Level 1

      Hi ,

       

      I can find only plain colors on to Color Picker , but this is line mixed color

       

      How can use this attached Color for my Applications Background Color .
      Please find the Screen Shot attached .

       


      please see the background  color

       

      postnew.jpeg

        • 1. Re: How can i use this color for my Application Background ?? Screen Shot Attached
          saisri2k2 Level 4

          Do you already know the color code which you want to set as background color? if not you can use photoshops eye dropper tool to grab the color from the image and use the color code generated. If you go into the source view in the FB, you can see backGroundColor property to the applciation, just mention

           

          backGroundColor="#XXERE" to set the color yu just grabbed from the image.

           

           

          eg : http://graphicssoft.about.com/od/photoshop/l/bllps503e.htm

          • 2. Re: How can i use this color for my Application Background ?? Screen Shot Attached
            Gregory Lafrance Level 6

            Are you trying to apply a gradient background?

             

            In Flex 3 in Application tag:

             

            <?xml version="1.0"?>
            <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
              backgroundColor="#666666"
              backgroundGradientColors="[#333333, #666666]">
            </mx:Application>

             

            In Flex 4 you need to set the backgroundColor and apply a skin for the gradient:

             

            -------------- mySkins/MyAppSkin.mxml -------------

            <?xml version="1.0" encoding="utf-8"?>
            <!-- containers\application\mySkins\MyAppSkin.mxml -->
            <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Metadata>
                [HostComponent("spark.components.Application")]
              </fx:Metadata>
              <s:states>
                <s:State name="normal" />
                <s:State name="disabled" />
              </s:states>
              <!-- fill -->
              <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
                <s:fill>
                  <s:LinearGradient rotation="90">
                    <s:entries>
                      <s:GradientEntry color="0x333333" ratio="0" alpha="1"/>
                      <s:GradientEntry color="0x666666" ratio=".66" alpha="1"/>
                    </s:entries>
                  </s:LinearGradient>       
                </s:fill>
              </s:Rect>
              <s:Group id="contentGroup" left="10" right="10" top="10" bottom="10">
                <s:layout>
                  <s:VerticalLayout/>
                </s:layout>
              </s:Group>  
            </s:Skin>
            

             

             

            -------------- test.mxml -------------

            <?xml version="1.0"?>
            <!-- controls\button\PopUpButtonMenu.mxml -->
            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           height="100%" width="100%">
              <s:SkinnableContainer skinClass="mySkins.MyAppSkin"
                width="100%" height="100%"/>
            </s:Application>
            

             

            If this post answers your question or helps, please mark it as such. Thanks!

            http://www.chikaradev.com
            Adobe Flex Development and Support Services

            • 3. Re: How can i use this color for my Application Background ?? Screen Shot Attached
              learner_doug Level 1

              Looks like your gradient is from:  0x212435 (top) to 0x262F4B (bottom)

              • 4. Re: How can i use this color for my Application Background ?? Screen Shot Attached
                Wrataxas Level 2

                To me, the background in that attached jpeg just looks white.  But you refer to it as "line mixed" color.  Does that mean it's a pattern?  If so, then you can use a BorderContainer and a backgroundImage.  Make a small jpeg or png that has the color pattern you want and then BorderContainer can tile it for you.

                 

                <?xml version="1.0" encoding="utf-8"?>
                <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                               xmlns:s="library://ns.adobe.com/flex/spark" 
                               xmlns:mx="library://ns.adobe.com/flex/mx"
                               minWidth="955" minHeight="600" width="1000" height="720">
                     <s:BorderContainer
                          backgroundImage="@Embed(source='../images/pattern.jpg')"
                          backgroundAlpha="1.0"
                          backgroundImageFillMode="repeat"
                          borderWeight="0">
                     </s:BorderContainer>
                </s:Application>