3 Replies Latest reply on Feb 23, 2009 9:06 AM by deakant

    Colour Scripts

      Hi all,
      Totally new to scripts and have set this script for my RGB colour using 8bit in AE CS3
      var set_X = [-200,2000];
      var set_Y = [-50,1000];
      var set_Z = [-100,5000];
      var set_main_color = [1,0,0,1];
      var set_hue_range = [-20,20];
      var set_lightness_range = [-50,0];
      var set_saturation_range = [-50,0];

      var add_Fill_Effect = true;
      var add_Color_Balance_Effect = true;

      This is a template from an internet site. But how do I tell the script to change from red to a light purple DDD0F7 8bit.

      Also am I best using 8, 16 or 32 bits per channel?

      And what the hell is a 32bit float?

      Thank you

        • 1. Re: Colour Scripts
          Mylenium Most Valuable Participant
          Expressions and scripts don't care about the actual bit-depth of a project. For more info on 32bpc float vs. 8bpc/16bpc read Stu Maschwitz blog, the online help and an infinite number of other VFX-centric sources. I'm sure Todd has added a ton of links to the help pages already. Apart from that, simply strike the above script stuff from memory. It is useless and for expressions it would be wrong, anyway.

          a)All ranges must be normalized between 0 and 1. They may exceed those values, but will not give a noticeable visually different result. The only exception are color controls in float-enabled effects, but usually this is not something you do with simple color expressions, as it also involves exposure, Gamma and levels.

          b)Colors must be RGB arrays. Conversion to HSL is only an intermediate step. Hex color coding is not supported (unless you implement your own code, of course).

          Aside from that, it's not really clear what you want. Proximity based coloring? Please provide more info.

          • 2. Re: Colour Scripts
            Todd_Kopriva Level 8
            > Also am I best using 8, 16 or 32 bits per channel?
            > And what the hell is a 32bit float?

            Here's the search that I did to find the answer to your question:

            search After Effects Help for '32 bit float'

            The page that comes up with that search says this:

            "Color depth (or bit depth) is the number of bits per channel (bpc) used to represent the color of a pixel. The more bits for each RGB channel (red, green, and blue), the more colors each pixel can represent. In After Effects, you can work in 8-bpc, 16-bpc, or 32-bpc color.

            In addition to color bit depth, a separate characteristic of the numbers used to represent pixel values is whether the numbers are integers or floating-point numbers. Floating-point numbers can represent a much larger range of numbers with the same number of bits. In After Effects, 32-bpc pixel values are floating-point values."

            That same page also gives some reasons to chose one color bit depth over another for certain work, and it points to a few other resources for understanding the benefits and considerations of working with 32-bpc color. Jonas's site, especially, does a good job of collecting this information.
            • 3. Re: Colour Scripts
              deakant Level 1
              Hey Thank you all very much