Color Gradient Highlight

So, a while back, I think it was @Regi who showed some of us on a clan that he likes to highlight some people's names in such a way, that the leftmost character starts off in one color and smoothly moves into another color at the rightmost character. The result was kind of cool, and for a while I've considered writing a general script to do it myself. While looking into it, I found not only RGB gradients, but an HSV and inverse HSV gradient as well, and decided to incorporate those as options. The HSV tends to preserve how intense/bright the colors are in the gradient, while RGB tends to get a little dark.

Source code is here. Just throw it all into a script, then call colorGrad(string, left_color_hex_string, right_color_hex_string, optional_gradient_type). RGB is default, 1 is HSV, 2 is HSV inverse. It returns a string that you plug into hecho. Sorry if it's a little weird, I've been sick and I wrote most of it while I was pretty tired.

Here's what it looks like. RGB, HSV, HSV-inverse, in that order, with different colors I chose mostly at random.

No idea if anyone would actually want it, but it was fun to make.

Comments

  • -cackles-
    YOU'LL BE PRAYING TO THE GODS FOR YOUR EYES BACK ONCE I START POSTING LOGS UP IN HERE>
  • KyrraKyrra Australia
    That one third from the bottom is so pretty! I'd love something like this.
    (D.M.A.): Cooper says, "Kyrra is either the most innocent person in the world, or the girl who uses the most innuendo seemingly unintentionally but really on purpose."

  • KenwayKenway San Francisco
    Oh that's neato. Might replace my rainbow crits with these. Maybe recolor my dsb echoes

    - Limb Counter - Fracture Relapsing -
    "Honestly, I just love that it counts limbs." - Mizik Corten
  • So, small problem. I forgot to reset the format of the hecho. It's not a huge deal depending on how you're using it, but here's the script with that problem fixed.
  • Kenway said:
    Oh that's neato. Might replace my rainbow crits with these. Maybe recolor my dsb echoes
    You read my mind!! So when you get that working for you... you know how to get ahold of me. <3
  • I stole this function. Not sure what I'm going to do with it, but it's to cool to let go.
  • Nicely done @Tydas, my script actually colors each letter individually and I have to assign RGB values manually to the target words or phrases. I also didn't write it, was shared with me by an old now retired friend, not sure if she wrote it or if not where she got it from though.

    This is good work, hope lots of people enjoy it.
  • @Tydas. I actually meant this script. Can you put this script to work with the data for svof politics?
  • Tahquil said:
    @Tydas. I actually meant this script. Can you put this script to work with the data for svof politics?
    Not in svof itself, you could use the data to do something with it.

    If there was a way to use it on existing text (the namedb uses selectString), I could probably implement something to allow the usage of arbitrary functions for highlighting.
  • yus pls. Go go go.
Sign In or Register to comment.