Forum Replies Created

  • Daniel Blokland

    October 5, 2015 at 2:09 pm in reply to: How to randomly change color of characters

    Thank you very much! Works perfectly for the rainbow.

    I’m having a play around to see if I can get some other uses out of the code for future projects.
    I was thinking of setting up a slider to highlight a single word in a paragraph – if I get it working I’ll post it.

    Anyway thanks again!!
    D.

  • Daniel Blokland

    October 2, 2015 at 4:30 pm in reply to: How to randomly change color of characters

    At the moment each letter picks a random colour – that works.
    But what I want is for each letter to pick the next colour in the array and then possibly loop around again?

    The reason I’m trying to get this too work is that I kept getting instances where two or more letters next to each other had the same colour.

    So I thought what might be useful is to have greater control – have each letter match the next colour in the aray.

    Sure, there less dynamic ways of doing this but I have some scripts that allow me to replace text in AE so that I can easily localise/translate the text (something I have to do in my job a lot).
    (A lot like variables in photoshop if you are familiar with those).

    At the moment I’m having to translate a line of text that basically has rainbow colours – each letter follows on to the next colour in the rainbow and then loops, and doing it by hand is going to take a long time in all the languages 🙁

    This script makes me feel so close yet so far 🙁
    Anyway if you’ve got any ideas I’d really appreciate it!!

    Thanks!

  • Daniel Blokland

    October 2, 2015 at 2:14 pm in reply to: How to randomly change color of characters

    Hi Dan,
    I’m trying to do the same sort of thing but have specific colours for each letter (image basically a rainbow, each letter one colour), don’t suppose you know how?

    I tried altering you code but couldn’t get the desired effect.
    I was trying to combine it with “selectorValue * textIndex/textTotal” but couldn’t get it to work.

    I guess its the “idx = Math.floor(random(palette.length));” that needs changing but I haven’t a clue to what.

    seedOffset = effect("Slider Control")("Slider");
    seedRandom (seedOffset+textIndex, true);
    //seedRandom(index*textIndex, timeless=true); //works but not desired effect

    palette = [[86,0,0],[100,38,18],[100,96,0],[0,73,0],[0,80,100],[39,40,99]];

    idx = Math.floor(random(palette.length));
    //idx = textIndex/textTotal;

    palette[idx]

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