Share your repls and programming experiences

← Back to all posts
Colour Thingy
CodingCactus (3010)


This is a colour thingy!

Basically just shows you colours

I dunno

RayvelArjoon (87)

@CodingCactus Did you buy these domains, or did you host them yourself?

CodingCactus (3010)

@RayvelArjoon got it for free with the GitHub student pack thing

thenullified (150)

<points a gun at you> always has been @ImmaEatYouMan

AtriDey (170)

@thenullified Harry Potter and the oldest joke in the book

GarryHo (6)

Time to make the same bloody thing in Node.js!

ZDev1 (615)

But it's easy I can make it with javascript:

CodingCactus (3010)

@ZDev1 never said it wasn't easy also that isn't the same thing

CodingCactus (3010)

@ZDev1 if I wanted to do something like that I would just use something I made a while ago

BobTheTomatoPie (1061)

coding cactus did a lot more than that, its different @ZDev1

ZDev1 (615)

@BobTheTomatoPie yea I don't need to make the same thing

CodingCactus (3010)

@ZDev1 but you said it was really easy and that you made it with just frontend js but you didn't you gave a different thing

ZDev1 (615)

@CodingCactus ok, I don't need to copy the idea!

CodingCactus (3010)

@ZDev1 erm you were the one that said you did it so um

CheesyCheese (6)

:music: show ur trooo colours... and thats why eye love youuuu...
so dont bee afraid... to let them shoowwwww :music: (totally didn't forget the rest of the lyrics)

adl212 (127)

Simple, but great!

BobTheTomatoPie (1061)

I like it, how'd you get it to open up as a link for each color?

CodingCactus (3010)

@BobTheTomatoPie with flask, if you look at the code you will be able to see something like

def colour(colour):
  return flask.render_temate('index.html', colour=colour)

what that does is when you go to that route, it passes that colour into the template and then the js in that does stuff based on it

CodingCactus (3010)

@BobTheTomatoPie basically look at code and you will see, it isnt too complicated I don't think

BobTheTomatoPie (1061)

that is beyond my knowledge lmao @CodingCactus

firefish (510) is totally not the average colour of all the pixels in my pfp
Also, doesn't work?

CodingCactus (3010)

@firefish that cuz brick isn't a css colour

DynamicSquid (3558)

Bro, I searched up the colour "squid" but nothing came up?

BobTheTomatoPie (1061)

squid is a color you know, just not a css color @CodingCactus

Kudos (30)

It's actually good, and you have your own domain, and you made this with Flask, which seems unreasonable but is efficient. I did this with Reactjs (frontend only), and it has about the same code as yours! It's sorta sad though that a project I spent 3 weeks on got a third of the upvotes (not including yours or mine's).

CodingCactus (3010)

@Kudos you can t do this with just frontend, how do you get the different URLs for each colour?

Kudos (30)

In that way, you can't. That I was wrong.
But with parameters, yes.

BuzzawJHKE (20)

Can u make it to where it gives u the ansi escape code?

Coder100 (8404)

ANSI escape codes change differentiate in each terminal, but you can do: \x1b[38;2;⟨r⟩;⟨g⟩;⟨b⟩m for foreground and \x1b[48;2;⟨r⟩;⟨g⟩;⟨b⟩m for background.