Posts tagged with :rainbow:

My first spline design art!
refactoring terrible JavaScript
A Rainbow šŸŒˆ
a doodle i did for someone!
Woo hoo! Finished the splatter paint workshop (thanks @zrl for getting me through the VSCode issues)
reviewed for midterms today and cleared out most of my inbox. also went to a park to Mind Detox
Today was not very about code so I almost haven't coded. But I haven't shown everything about updating my Minecraft mods to the latest version. One of them is a client mod about displaying the key presses on the screen, someone requested it so I made it. While updating the mod I also wanted to add a new feature which was rainbow text! But I was a bit lost as I didn't know how to do that, there's multiple methods: ā€¢ combining the font texture with a rainbow texture in the OpenGL shader, but that was unpractical with the mess which is Minecraft rendering (and I don't know enough about it) and making a "moving" texture would be hard with my limited knowledge about shaders. ā€¢ drawing every character a different color: that's possible, with the latest MC update as they dropped the immediate rendering (OpenGL 1.0) it's not a big deal to do that way as it won't destroy performance So I chose the second method which is less smooth than the first one but it still gives a convincing effect. How does it work? Simple, when I want to draw a string, I'll use a special function if I want the rainbow effect, which will draw each character separately. To get the color I use a HSB to RGB method which allows me to make easy colors as it goes from 0.0 to 1.0 (from red to purple, like a rainbow but circular), and to make the color "move" I tied it to the current time in milliseconds and to make the color independent from each character I also tied the position of each character:
    public static int getRainbowRGB(double x, double y)
        float speed = 2600.0F;
        return Color.HSBtoRGB((float) ((System.currentTimeMillis() - x * 10.0D - y * 10.0D) % speed) / speed,
                (float) AuroraKeystrokes.get().config.getRainbowSaturation(),
A bit difficult to find it at first but when found it gives a cool effect :)
This science behind colpal logo *Colpal is a website about colors ... That i presented a week ago
Meanwhile, above the golf course
went for a walk
Made a doodle to try out my new markers hehe
Designed my landing page header in react! (I've been learning react, so I'm super happy)
I got my customizer almost fully working! The CSS stuff is still being kinda quirky but in theory it should work once I put it on a *.hackclub.com domain (CORS issues still lol, I think at this point I probably need to rethink the way Iā€™m applying the CSS). I also made it look a little nicer so the UI will probably stay the same, but if anyone has any suggestions Iā€™d love to hear them!