Forum Replies Created

  • Lenny Mason

    December 12, 2019 at 12:11 am in reply to: Extendscript: Add Pseudo Effect

    Hi, I’ve used your script to convert my pseudo to binary and I’ve used Santi Agustí’s link to apply it to that code, but when I try to run it, I get an error saying: ‘null is not an object’. Not sure what I’m doing wrong, I’ve only changed the presetBinary…

  • Lenny Mason

    December 1, 2019 at 11:08 pm in reply to: Adjust hue, brightness AND saturation through rgbtohsl?

    Alright, so far I’ve managed to write the following expression:


    if (effect("Lenny's Grain")("Shadow - Custom?") == 0 ? 100 : 0) {
    c = effect("Lenny's Grain")("Fill");
    hsl = rgbToHsl(c);
    factor = effect("Lenny's Grain")("Shadow - Lightness") / 55;
    newL = Math.min(hsl[2]*factor,1);
    hslToRgb([hsl[0],hsl[1],newL,hsl[3]])
    } else {
    effect("Lenny's Grain")("Shadow - Color")
    }

    So, if I turn the checkbox on to add a custom shadow color, you can pick your own color. If I turn the checkbox off, the shadow uses a color that updates automatically to the fill color of a Color Overlay layer style. This works fine, but I’d rather not use a Color Overlay, I’d rather make the shadow color adjust to the content fill. This works fine if I just change the code to:

    c = content(“Rectangle 1”).content(“Fill 1”).color

    But that would mean that the shape has to be a rectangle. Is there another way to target the content fill?

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy