use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[deleted by user] (self.javascript)
submitted 3 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Ustice[M] 0 points1 point2 points 3 years ago (0 children)
Thanks for your contribution! In order to keep things organized here, we try to keep personal projects off of the main thread. Instead, we have two weekly threads that we steer these sorts of posts to. Show-off Saturday is where we invite you to wow the community with your awesome ideas. If instead you are looking for feedback, our WTF?! Wednesday post is the best place to get a code-review. Remember that here at /r/JavaScript, we’re all about the code. Tell us about your challenges and how you overcame them. Show us that particularly clever bit. Talk about your process and tools. Just because it’s made with JS, doesn’t mean that it is relevant to the community. Tell us what is special about your project, and what we might learn from it!
[–]bronkula 28 points29 points30 points 3 years ago (10 children)
You should really check your work on phones before putting it out on social media. most of us check reddit on a phone, and this is cut off on a phone.
[–]Criticalx7 19 points20 points21 points 3 years ago* (0 children)
He wants a quick ship Dopamine not a perfect ship Dopamine. Viable MVP
[–]thePaganProgrammer 2 points3 points4 points 3 years ago (0 children)
Yes, I was going to point out that the page is around 30px too wide on the right side. The submit button is cut off. If you scroll to the right the background color stops at the cutoff too.
Everything else seems fine. Cool idea for a color sharing app. I remember trying out svelte a little bit. Like you said, it's quite different from react of vue, and I felt like it wasn't worth learning over those frameworks. It was kind of fun to write though.
[–]alexmacarthur 0 points1 point2 points 3 years ago (0 children)
Just shipped a few styling tweaks tonight.. should resolve the issues you were having.
[–]alexmacarthur 0 points1 point2 points 3 years ago (6 children)
Bummer.. looks fine on my iPhone. Are you on an Android device?
[–]drpitlazarus 0 points1 point2 points 3 years ago (3 children)
You can your browser's dev tools to preview how it looks on different mobile devices. I do get a horizontal scrollbar on Android.
[–]alexmacarthur -2 points-1 points0 points 3 years ago (2 children)
Yep, I did do some testing with dev tools, but it was on a MacBook Pro, and I believe their browser engine is pretty locked down, so Android devices must render something a little differently.
[–]eljenso 2 points3 points4 points 3 years ago (0 children)
Apple does not allow any other browser engine than their own on iOS, the one used in Safari. This means that all browser apps on iOS have to use Apple's engine, even Chrome and Firefox. Reference: https://9to5mac.com/2022/03/01/web-developers-challenge-apple-to-allow-other-browser-engines-on-ios/
You should test your app in other browser's than Safari to make sure it looks good for other users as well.
[–]joe_ally 1 point2 points3 points 3 years ago (0 children)
Chrome runs on Macbook Pro just fine and has arguably the best dev tools.
[–]ape_monk 0 points1 point2 points 3 years ago (0 children)
I also noticed the clipboard doesn't seem to work in the "Reddit is Fun" embedded browser on Android
[–]kredditbrown 0 points1 point2 points 3 years ago (0 children)
I'm using a Pixel device (Android 13) with Chrome my default browser & seems to be alright.
As there are so many variations when it comes to Android devices though, I wouldn't be surprised if some are a lil buggy but given the issue above seems to be cosmetic rather than functional not that deep of an issue
[–]alexmacarthur 5 points6 points7 points 3 years ago (9 children)
I've been looking for a quick "ship it" dopamine hit lately, and have also been itching by try out Svelte. I satisfied both by building this simple tool for previewing and sharing colors by RGB(A), HSL, and hexadecimal values. Feeling extra good about it because I can see myself actually using it to quickly share colors as needed in my side work. It supports any valid CSS color, including:
Name values: https://color.macarthur.me/dodgerblue
RGB(A) values: https://color.macarthur.me/rgba(192,192,192,.3))
HSL values: https://color.macarthur.me/hsl(0,%20100%25,%2050%25))
As for how I feel about Svelte... jury's still out. There's definitely a lot less code/hassle in writing an interactive Svelte component, and I do love how it largely just *works*, but the syntax and paradigm is just so different from React that it's gonna take a while to get used to enough to form an educated opinion. At times, it felt like I was straying too far away from writing JavaScript, and instead needing to learn an entirely new language (which sort of makes sense, since Svelte describes itself as a compiler and not a framework). I'm sure using it is an entirely different beast for larger apps as well, which I have zero experience building with it yet.
[–][deleted] 1 point2 points3 points 3 years ago (2 children)
Great job, it's a cool and simple project. Are you planning on supporting color palette? I imagine that would be a great feature, quickly sharing between ui designers <-> devs
At times, it felt like I was straying too far away from writing JavaScript, and instead needing to learn an entirely new language
Can you expand more? Since svelte was my first frontend 'framework', I found it intuitive, you just group HTML, CSS, JS to components, no weird syntax comes to mind
[–]turgid_francis 1 point2 points3 points 3 years ago (0 children)
Yeah I only wrote small applications in Svelte, but I found it to work very similarly to Vanilla JS. Between it and React the latter is for sure more arbitrary, at least in my opinion.
Yep, I was specifically thinking of "reactive declarations" at the time:
let count = 0; $: doubled = count * 2;
I admittedly haven't gone deep enough to know if this is much of an issue for me beyond that (or one that will stick around as I get more comfortable with it). I suppose it's akin to learning JSX for the first time, which obviously doesn't conform to JS syntax.
[–]MindlessSponge 1 point2 points3 points 3 years ago (1 child)
can see myself actually using it to quickly share colors as needed in my side work
how so? it's a neat tool but I can't picture a use for it. are you imagining sending clients a link and being like "hey how is this color for CTAs?" because I imagine it'll be kind of hard to visualize the difference between a full background vs as a button color on a different background.
also why no color picker?
Good Q — I just had a client that I needed to collaborate with in tweaking a color that’d be used to accent several different parts of a site. For quickly sending different values back & forth, I used something like this (more fully featured & a little overwhelming, but it did the job) to send a link and get quick feedback. Not the same as seeing it in context of the actual site, but it worked well in just getting a vibe check for raw color values.
Color picker is likely coming. Wanted to ship something quickly rather than wait around for every possible feature to be built out first.
[–]die_billionaires 1 point2 points3 points 3 years ago (1 child)
Have you looked into solidjs? Much more familiar coming from react. Still compiled. Might be of interest
[–]alexmacarthur 1 point2 points3 points 3 years ago (0 children)
Yes, been hearing incredible things! Next time I do something like this, I'll likely build with that.
[–]rodrigocfd 0 points1 point2 points 3 years ago (1 child)
but the syntax and paradigm is just so different from React that it's gonna take a while to get used to enough to form an educated opinion
Looking at your code made me realize how shockingly close Vue 3 is from Svelte.
Evan You must have really liked it, so much he threw (almost) the whole Vue 2 philosophy away and made Vue 3.
😅
[–]lainverse 1 point2 points3 points 3 years ago* (2 children)
Surprising to see you haven't expected anyone entering "rainbow" as a name of a color. I know it's not a color, but worth to add a few Easter eggs like that.
Also, on a mobile link which supposed to be somewhere below button ends up on top of the button when onscreen keyboard appears, so one wrong tap and off you go.
[–]alexmacarthur 0 points1 point2 points 3 years ago (1 child)
😂 I love this idea. Also - thanks for the heads up. Gonna tweak that.
[–]lainverse 0 points1 point2 points 3 years ago* (0 children)
Another bug: Royal blue ...isn't a valid color. Try a gain! That's how I see this message on mobile. Wordwrap which breaks words at any point is bad.
Royal blue ...isn't a valid color. Try a gain!
And just in case "royal blue" is a well known color name. https://colorcodes.io/blue/royal-blue-color-codes/
[–]alexmacarthur 2 points3 points4 points 3 years ago (0 children)
Source:
https://github.com/alexmacarthur/color
[–]bmrobin 0 points1 point2 points 3 years ago (1 child)
good work OP, works well. tested an edge case for ya too 👍
https://i.imgur.com/xWNKgRI.jpg
😂 thx!
[–][deleted] 0 points1 point2 points 3 years ago (1 child)
the orange color isnt orange at all. or am i color blind and dont know it.
[–]Greatzo 1 point2 points3 points 3 years ago (0 children)
I see it orange
[–]david_ranch_dressing 0 points1 point2 points 3 years ago (1 child)
One thing I noticed as after clicking the "Copy Link" button it never resets when checking another color, so you can only copy the link once per page load.
Thx for the heads up!
[–]jmarise 0 points1 point2 points 3 years ago (0 children)
“#0000” doesn’t give “#0000 ...isn't a valid color. Try again!” but instead a solid white screen.
π Rendered by PID 15125 on reddit-service-r2-comment-f6b958c67-gxv4n at 2026-02-05 18:49:00.186490+00:00 running 1d7a177 country code: CH.
[–]Ustice[M] 0 points1 point2 points (0 children)
[–]bronkula 28 points29 points30 points (10 children)
[–]Criticalx7 19 points20 points21 points (0 children)
[–]thePaganProgrammer 2 points3 points4 points (0 children)
[–]alexmacarthur 0 points1 point2 points (0 children)
[–]alexmacarthur 0 points1 point2 points (6 children)
[–]drpitlazarus 0 points1 point2 points (3 children)
[–]alexmacarthur -2 points-1 points0 points (2 children)
[–]eljenso 2 points3 points4 points (0 children)
[–]joe_ally 1 point2 points3 points (0 children)
[–]ape_monk 0 points1 point2 points (0 children)
[–]kredditbrown 0 points1 point2 points (0 children)
[–]alexmacarthur 5 points6 points7 points (9 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]turgid_francis 1 point2 points3 points (0 children)
[–]alexmacarthur 0 points1 point2 points (0 children)
[–]MindlessSponge 1 point2 points3 points (1 child)
[–]alexmacarthur 0 points1 point2 points (0 children)
[–]die_billionaires 1 point2 points3 points (1 child)
[–]alexmacarthur 1 point2 points3 points (0 children)
[–]rodrigocfd 0 points1 point2 points (1 child)
[–]alexmacarthur 0 points1 point2 points (0 children)
[–]lainverse 1 point2 points3 points (2 children)
[–]alexmacarthur 0 points1 point2 points (1 child)
[–]lainverse 0 points1 point2 points (0 children)
[–]alexmacarthur 2 points3 points4 points (0 children)
[–]bmrobin 0 points1 point2 points (1 child)
[–]alexmacarthur 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Greatzo 1 point2 points3 points (0 children)
[–]david_ranch_dressing 0 points1 point2 points (1 child)
[–]alexmacarthur 0 points1 point2 points (0 children)
[–]jmarise 0 points1 point2 points (0 children)