5 Replies Latest reply on Apr 25, 2012 1:43 PM by brettpix

    Set Field Background colour from colour code in a layout

    brettpix

      Title

      Set Field Background colour from colour code in a layout

      Post

      Hi All

      This seems so simple and a thing that users would commonly do, but I can not see how to do it.

      I have a range of products, each with same label layout design. I want to be able to assign a different colour to the background of each label. I have a field that contains the colour number (eg a2a640) In one fiel.

      Currently a colour code file is given to designer but when we make design change we need to change hundreds of labels.

      Any help would be greatly appreciated.

      Product_label_Colour.png

        • 1. Re: Set Field Background colour from colour code in a layout
          philmodjunk

          Put a container field behind everything else on your layout.

          Insert or paste a rectangle of the desired color into this container field. (use "expand or contract" date formatting option to ensure rectangle perfectly fills the container field.)

          Depending on what you need, you can either put this field in a related record and use the relationship to specify the record with the desired color or you can use a container field with global storage. Either way, you can put this field on many different layouts and changing the color in the field (or using the relationship to refer to a different record) will change the background color in all of your layouts where you use the container field for this purpose.

          • 2. Re: Set Field Background colour from colour code in a layout
            Jade

            I suspect that your colour numbers are hexadecimal for the RGB values (e.g. a2, a6, 40 converts to 162, 166, and 64 for Red, Green, Blue).  It would be painstaking but you can type in these 3 values into the colour picker sliders for each container background.

            Color Picker

            • 3. Re: Set Field Background colour from colour code in a layout
              brettpix

              Hi

              Thanks for the ideas. I tried both and was not sure if I did either correctly.

              In the end, I have copied a block of colour into a container. I selected reduce or enlarge to fit in inspector.  I assume this is not best as if I want to use the colour for a large area of a layout I imagine the quality will degrade as I am using an image of a colour.

               

              Can I tile the square of colour. Phil I think that is what you were suggesting but I do not see how to do that. I will look into that further.

               

              Thank you for your valuble assistance.

              • 4. Re: Set Field Background colour from colour code in a layout
                philmodjunk

                Actually, you are doing exactly what I suggested. For a single color background, this should work. We used to use containers like this for conditional effects all the time before we had conditional formatting.

                The key is in what you want to do next. You can set up a table of records with your container field so that each record stores a different color. You can then set up a relationshp so that you can manipulate the relationshp to link to a different records in order to display different background colors.

                You can also make this a global field loaded via script so that one field can be used for background color on all layouts regardless of the underlying table associated with it.

                • 5. Re: Set Field Background colour from colour code in a layout
                  brettpix

                  Thanks Phil

                  I understand. Thanks for the help. I have set up as you say and am using a the relationship for manipulate the container for different used.

                   

                  Thanks again

                   

                  Brett