8 ms·
Fucking Color Picker
- pooya72 7y agoI know some people think Electron is cancer[1], but it is the fastest way to write cross-platform applications. I've been trying to learn to make apps for macOS, and it feels like even Apple doesn't want me write apps for the Mac. [1]:https://medium.com/commitlog/electron-is-cancer-b066108e6c32 https://medium.com/commitlog/electron-is-cancer-b066108e6c32
- mizaru 7y ago128 MB for something that should be a couple hundred KB at best? Yes, it is cancer.
- IMTDb 7y agoWell now it's 128MB for something that did not exist.
- Ultramanoid 7y agoBeen using GColor2 forever on Linux. And I believe there are others. Don't really see how this improves it. I use Mac OS as well but I don't miss the color picker from Mac OS when I'm using Linux, not sure what his problem is. Or the attitude in general, I wouldn't want to be running something showing at all times such a cute name on screen. No thanks.
- detaro 7y agoWhich platform supported by Electron does not have existing color picker applications?
- laichzeit0 7y agoProvide an alternative to the cancer that has every single advantage of Electron.
- jschwartzi 7y agoQt
- Veen 7y agoOne of the advantages of Electron is that apps can be written in JavaScript and other web technologies, making it accessible to many more developers.
- jschwartzi 7y agoYou can use QML and QtQuick and use Javascript plus a markup langauge.
- jacobedawson 7y agoI'd like for people to drop the whole 'x is cancer' thing since aside from the actual fuckery of cancer most things aren't that bad. A little too flippant imo :)
- nieksand 7y agoIs it actually faster to develop in Electron than with QT and C++? It has been over a decade, but I remember it being both straight-forward and pleasant to support Linux, Windows, and MacOS. I vaguely recall supporting Solaris too.
- mosselman 7y agoI don't know about QT and C++, but a while ago I wanted to try out Electron and I just could not figure out how to build anything with it.
- babuskov 7y agoWeb developers using Electron probably count in the time to learn C++ vs the fact that they already know web stack. ;)
- 781 7y agoAs a C++ developer who had to learn Javascript and Vue to write an Electron app, it was still faster than writing the same app in QT (which I used before).
- pooya72 7y agoHow and why was it faster? Did it have to do with the tooling?
- deleted 7y ago[deleted]
- jschwartzi 7y agoOf they can just use QML and use JavaScript and a declarative language for their UI.
- laurentl 7y agoI just realized this morning that JavaScript is the new Java. js targets the browser (angular, React...), the back-end (node), the desktop (Electron) and mobile (React native). Just like the Java of old with applets, javax, JME, and of course weblogic and friends, js today allows you to code anything, as long as you don’t mind doing it badly, insecurely and/or wastefully. Due to this ubiquity, a large majority of job openings list js in one form or another as a prerequisite (remember when entreprise code was synonymous with Java?) Once you know enough js to be dangerous, there’s little incentive to pick up another programming language.
- Waterluvian 7y agoI think the bottom line is that most of the time you see an electron app, just say to yourself, "this wouldn't exist if electron didn't exist." It isn't replacing app dev. It's adding more app developers.
- happyweasel 7y agocancer is also one of the "fastest way" to grow some kind of tissue. That might kill you in the end.
- AnIdiotOnTheNet 7y ago> it is the fastest way to write cross-platform applications. I disagree. Maybe that's true if you're a webdev unwilling to learn anything else, but Lazarus is the fastest way I've found to write cross-platform GUI software, and as a bonus it compiles to native code in a single executable.
- seba_dos1 7y ago...but does it work on Wayland? ;]
- DiseasedBadger 7y agoA contradiction in terms.
- Drup 7y agoIf you wonder about linux: gcolor2 (http://gcolor2.sourceforge.net/ http://gcolor2.sourceforge.net/) does the job. And for size fetishists: it weights 42KB.
- detaro 7y agoOne good option for Windows is COPI, 88 KB .exe: https://www.heise.de/download/product/copi-colorpicker-65782 https://www.heise.de/download/product/copi-colorpicker-65782
- acqq 7y ago> for Windows is COPI, 88 KB .exe And the EXE is only 32 KB when UPX is applied on it. And uses only 1 MB of RAM when running.
- spookylukey 7y agoAlso, xmag, you already have it installed if you use the X Window System. It's 41kb, extremely lightweight (always starts instantly) and also magnifies a screen portion which is helpful for picking colours.
- schoen 7y agoSomething I never realized about xmag is that if you click on a pixel, it tells you that pixel's color as a hex triple.
- NikkiA 7y ago> you already have it installed if you use the X Window System Maybe. It looks like it's been spun out into `x11-apps` on debian based distros in the last year or two, and for some reason I don't have that package installed despite using X
- aeonflux 7y agoSeriously there was no existing color picker app for Windows alraady?
- signal11 7y agoI use Pixie[1], which works really well even on Windows 7 and 10. It's an 11kB portable app. [1] http://www.nattyware.com/pixie.php http://www.nattyware.com/pixie.php
- selune 7y agoHave been using Pixie since forever on Windows. Neat little tool.
- einr 7y agoThank you, this is beautiful. There are a couple of other cool tools on the page too that I weren't aware of, like this: http://www.nattyware.com/fontster.php http://www.nattyware.com/fontster.php It's a HTML + Javascript desktop application that weighs 2 K. And it even uses native widgets and looks and feels like a real application. Isn't that something... ;)
- gokhan 7y agoOf course there are many, but bashing Windows is free. After 10 seconds on google: http://colorcop.net/ http://colorcop.net/ http://www.iconico.com/download.aspx?app=ColorPic&type=free http://www.iconico.com/download.aspx?app=ColorPic&type=free http://www.youngsmarts.com/download.htm http://www.youngsmarts.com/download.htm ... and so on.
- baal80spam 7y agoDidn't know about Color Cop, it's great!
- astura 7y agoOf course there was, even open source Electron ones[1], but that wouldn't be a blog post and a chance to "promote" yourself. Also, opening up Photoshop for the color picker? Paint opens faster than I can blink and has a color picker. [1] https://electronjs.org/apps/colorpicker https://electronjs.org/apps/colorpicker
- stephc_int13 7y agoWow, this is waaaay too big for my taste. I'm absolutely sure it is possible to write the same cross-platform app for less than 500KBytes and no dependencies.
- phiresky 7y agoYes, this 450 line program could have been written in whatever native language you want with probably 3x the code and time spent, but why would you? Developer time has been more expensive than hardware for a decade now. Everyone here loves to virtue signal about how horrible programs that take 0.01% of the space of a normal SSD and 1% of the RAM are, but the fact is that it does not matter at all, and you wouldn't even have noticed if you hadn't intentionally looked at the size of it.
- lazyjones 7y ago> Developer time has been more expensive than hardware for a decade now. How about developer time of 1 person vs. hardware (and electricity, CO2 emissions...) of 1 million users?
- MaulingMonkey 7y ago> vs. hardware (and electricity, CO2 emissions...) of 1 million users? Do you actually have a million users? Can that developer time be spent saving even more hardware or human costs elsewhere?
- lazyjones 7y ago> Do you actually have a million users? Everybody who works on a cross-platform version of a generic utility has potentially many millions of users. > Can that developer time be spent saving even more hardware or human costs elsewhere? Nobody knows. But it's obvious that wasting resources like this is going to scale with every user - even non-users who just download out of curiosity.
- kebman 7y agoI called the dev and asked him to wash his mouth with soap!!111
- amelius 7y agoWhat is its memory footprint?
- Hendrikto 7y agoIt uses Electron, so… abominable.
- Piisamirotta 7y agoFor me it takes 1 second to hit alt+print screen and then open ms paint with my shortcut ctrl + alt + P.
- Hendrikto 7y agoA color picker using Electron. The epitome of resource waste.
- montroser 7y agoxmag comes by default on most Linux distros
- arendtio 7y agoKDE/Plasma actually comes with a built-in color picker which I use on a daily basis: https://kde.org/announcements/plasma-5.5/plasma-5.5-colorpicker.png https://kde.org/announcements/plasma-5.5/plasma-5.5-colorpic... https://userbase.kde.org/Plasma/ColorPicker https://userbase.kde.org/Plasma/ColorPicker
- booleandilemma 7y agoI had become so used to just grabbing color values from any old pixel on the screen..., but on Windows the best way I came up with was to take a screenshot, wait for Photoshop to open, then get the color value through the PS eyedropper tool. That took probably 30 seconds to get a single color, since Adobe software is somehow still dog slow on brand new hardware. You can do the same thing in MS Paint and save yourself 15 seconds.
- Scrantonicity 7y agoand you can leave it running in the background all day long
- happyweasel 7y agoNope, you cannot colorpick with MS Paint from the whole visible screen (i.e. all windows and the desktop)
- booleandilemma 7y agoThe workflow is: 1) Take a screenshot. 2) Paste it into Paint. 3) Use the eye dropper to select the pixel that has the color you want. This is the equivalent of editing a file with Notepad++ instead of opening it in Visual Studio.
- kijin 7y agoIf you can screenshot it, you can paste it into MS Paint. No difference from Photoshop or any other image editing program. The only problem I have with MS Paint is that it doesn't give me the hex value of the color I picked, only the individual RGB values.
- Theodores 7y agoI think this is more down to Apple style workflow than actual requirements. With Apple you have to do things the special Apple way because Steve Jobs said so. On Linux I am not thinking 'oh, where is my system wide colour picker and getting irate because there isn't one'. The colour picker works fine in the image editor program, with the browser add on I am covered for practically every use case. Sure I had to add the browser extension and would be stuck without it, but my thinking was to get the browser extension rather than even think to install an OS widget. I can't say that I have had a genuine need for a OS level colour picker ever. It is just not something needed. And no, just because I am not on an Apple machine does not mean I don't do anything 'creative'. With Linux there are plenty of colour pickers already out there, 'pick' is very neat as it gives you a little screenshot of the context of where you got your colour from with a sensible colour name given too (albeit not a standard X-Windows style one, so you get 'Hot Cinnamon' instead of 'chocolate').
- pooya72 7y agoI actually tried installing this on my Mac and it doesn't open. I'm on 10.14.4.
- brassattax 7y agochoco install instanteyedropper
- VitoVan 7y agoFucking Electron
- kgraves 7y ago> So I wondered... why didn't Windows just have a fucking color picker? Color Picker for Windows (500KB) (1.6MB unzipped): http://instant-eyedropper.com http://instant-eyedropper.com Significantly smaller than the Electron app and works across Windows XP to 10.
- allwynpfr 7y agoI use this and couldn't recommend it more
- altcognito 7y agoMWSnap has a color picker in addition to a screen capture and has been around since 2002. I still use it on Win10. http://www.mirekw.com/winfreeware/mwsnap.html http://www.mirekw.com/winfreeware/mwsnap.html
- fxfan 7y agoWindows has a million color pickers, just go to chocolatey
- gosseyn 7y agoI fucking hate electron so much...now everything take as much RAM and CPU usage as chrome...even a fucking color picker!
- lousken 7y agoI just use ShareX on windows which has color picker tool. Also you can simply create a system-wide keybind for it.
- tenryuu 7y agoI bound mine to the middle click action of the taskbar. but I also overrode the tooltip text on the screenshot cursor to display the RGB hex, as a ctrl+c will copy whatever is in this box
- 781 7y agoComplains about Photoshop being slow to start. Writes color picker in Electron.
- happyweasel 7y agoOne of the slowest things in photoshop is the initial document selection/welcome screen.. which is probably... javascript+browser engine. And I also think the slow "new document" screen is also javascript Also let's not forget all those stupid creative cloud background updater jobs / services... that use node.js
- mehrdadn 7y agoConfused... why do you need Photoshop? Can't you just PrtScn, paste in MS Paint, and use the eyedropper?
- philliphaydon 7y agoAbsolutely. But he doesn’t know how to use windows. That’s why he went to linux.
- misnome 7y agoA dev missed some feature of their usual OS and so wrote a cross platform version open source in their spare time. Who cares that they used the “wrong” language or framework, or could have solved it another way or “who need this functionality anyway”. Isn’t this supposed to be what the dev spirit is about?
- number6 7y agoThis
- theNextEpisode 7y ago100%. HN comments can be so perfectionist which is ironic given the name. Someone spent their free time to give the world something free, shame on them it's not perfect.
- ekianjo 7y ago> A dev missed some feature of their usual OS and so wrote a cross platform version open source in their spare time. So what matters is the "why" and the "what", and we can just forget about the "how"? Engineering is all about the how we do things, and HN tends to have more engineers than your typical online community. What's wrong with that?
- krapp 7y agoThat isn't the problem. The problem is the community, and the effect Electron is having on it. Cross platform application development is considered a "solved problem" with Electron, and it's developed a cult that leads people to disparage native applications and native development as inferior in all cases, as if Electron were already the best possible solution rather than a hack around webdev that blew up because of the SV hype machine. Because of this commoditization around a single language and a single framework (mostly by corporate interests, mind you,) curiosity and innovation are halted in favor of developer time efficiency and resume visibility. No one is even going to bother trying to create the next cross-platform application solution after Electron, because they would only be able to do so in Electron. It's getting kind of ridiculous.
- nickjj 7y agoIf anyone is put off by it being an Electron app and are running Windows, here's an AHK[0] script to get the hex code of the pixel color under your cursor and copy it to your clipboard: --- #h:: MouseGetPos, MouseX, MouseY PixelGetColor, color, %MouseX%, %MouseY% StringLower, color, color clipboard := SubStr(color, 3) --- It's bound to Win+h (hex color) by default. It's not fancy, but it works. You just run it in the background and hit the hot key to copy the color whenever you want to. There is no UI. What's neat about it is the entire source code fits in a tweet: https://twitter.com/nickjanetakis/status/1108825825116332032 https://twitter.com/nickjanetakis/status/1108825825116332032 And it uses 0.6MB of RAM when running. [0]: https://www.autohotkey.com/ https://www.autohotkey.com/
- TeMPOraL 7y agoAutoHotkey is amazing. It's a little gem of a Windows app. I only wish I discovered it earlier, when I was still using Windows as my main OS. AHK can be used to trivially fix many usability warts you have with random software, and is powerful enough that someone implemented a clone of dwm tiling window manager in it (bug.n, [0], I used it for more than a year and can attest it works very well). -- [0] - https://github.com/fuhsjr00/bug.n https://github.com/fuhsjr00/bug.n
- nickjj 7y agoTotally agreed. I'd go as far as saying AHK is one of the few tools on Windows that I really miss when on a Linux system. It's that good and I don't even know it too well, I just hack things together as needed. Bash is great and all but AHK does so many useful GUI things. Thanks for the link on bug.n. I use i3 on my Linux laptop and for day to day usage I do prefer a tiled window manager of some sort. My Windows box is my main workstation so having some type of proper tiled wm would be really nice. Currently I use dexpot (virtual workspaces), AHK (global hotkeys), keypirinha (fuzzy find app launcher) and the built in Win 10 window split shortcuts to get as close as I can to an i3 set up.
- AnIdiotOnTheNet 7y agoAutoHotKey is great and the kind of thing that should just be built in to desktop OSs. Why shouldn't I just be able to assign any key combo to anything, contextually? Why do we have to rely on applications supporting hotkeys at all?
- conistonwater 7y agoHow does a color picker weigh ~50MB? Is there something wrong with the framework it's using?
- est31 7y agoIn total, the app is 122 MiB large. Of which the runtime is about 120.3 MiB. There is even a copy of ffmpeg (2 MB) for the rare occasion when you want to play back an mp4 video in your color picker. The actual app itself is in the resources directory which is 1.8 MiB large. This directory contains files electron.asar (214 KiB), app.js (1.7 KiB), package.json (727B), and directories static (152 KiB) and node_modules (1.4 MiB). The actual content created by the author is in app.js, package.json and static, which together take 160 KiB, of which 52 KiB is the logo (would have been much smaller as SVG) and 68.8 KiB a bundled font. In the node_modules directory major contributors for size that I see are: * node_modules/tinycolor2/demo (288 KiB; largest contributor here is a jquery copy) * node_modules/tinycolor2/docs (228 KiB) * node_modules/tinycolor2/test (116 KiB) * node_modules/electron-settings/node_modules/fs-extra/docs (96 KiB) * node_modules/electron-settings/node_modules/fs-extra/CHANGELOG.md (56 KiB) * node_modules/user-media-screenshot/.idea/ (44 KiB) All of the stuff I listed above is quite redundant for the users who just want to run the app. If you remove them, the 1.8 MiB become 764 KiB for the entire app and I'm pretty sure that minifiers, bundlers etc. could make it even smaller. The runtime could be provided by the OS. I think it's definitely possible to create apps < 500 KiB with web technology, it's just the deployment patterns that turn this into a major download of 122 MiB. As for the RAM usage, idk about that. I guess if the runtime is provided by the OS, it would be the same electron binary so the OS could share that one at least.
- solarkraft 7y agoThanks for the wonderfully detailed breakdown. I wish every electron app could get this. I don't hate web technology, I just hate electron's distribution model. There are so many frameworks to get around this.
- Polarity 7y agoWhat´s the problem with this? I have enough space on my drive. Sure the app is bigger but it´s platform independent and works flawlessly. Native apps crash often, use big os dependent frameworks (you have to install sometimes) and only to have a smaller bundle? I don't get it.
- 7y ago
- boot13 7y agoColorMania works great and is 774 KB. http://www.blacksunsoftware.com/colormania.html http://www.blacksunsoftware.com/colormania.html.
- _noise_ 7y agoDoesn't seem to fucking work. On Linux it seems confused with a muti-monitor setup, the orbit button does nothing. On Windows, in a VM, the orbit button opens a web browser to https://www.tonymccoy.me/orbit/#ffffff https://www.tonymccoy.me/orbit/#ffffff and gets a 404 Not Found
- _noise_ 7y agoAlso QT provides a cross-platform color chooser widget. https://doc.qt.io/qt-5/qcolordialog.html https://doc.qt.io/qt-5/qcolordialog.html KDE's KColorChooser is simply a wrapper around this and is less than 100 lines of code, mostly setting up the about box. https://kde.org/applications/graphics/kcolorchooser/ https://kde.org/applications/graphics/kcolorchooser/ This could have trivially been made into a cross-platform color chooser that uses significantly less resources. On my Linux box Fucking Color Chooser spawns 4 fucking processes uses 128 MB of RAM and 4% CPU. KColorChooser uses 15 MB in one process and near zero CPU. Please stop making everything a web application.
- kakarot 7y agoI was really excited until I saw Electron at the bottom. A color picker is a tantamount example of an application that does not belong on the Electron platform.
- lancebeet 7y agoI use pyautogui for this, pyautogui.displayMousePosition(). It obviously doesn't have a fancy preview, different representations or the other stuff you would get in a proper color picker, but it's fast and easy if you already have pyautogui installed and works on both linux and windows.
- drummyfish 7y agoSorry but both Mac and Windows are proprietary, no color picker can save you.
- gmailnet 7y agoin Blender, you can choose your color picker type... https://docs.blender.org/manual/en/latest/interface/controls/templates/color_picker.html https://docs.blender.org/manual/en/latest/interface/controls...
- fxfan 7y ago7 searches for cancer in this thread as of 7:51 AM UTC. (Not including my comment) Got me thinking about the meaning of c-word and I realized electron is a contagious form of cancer. It spreads from devs to user sure, but it is also spreading from devs to devs and more and more devs are using it. Fucking Microsoft has an enterprise product built in electron now. Who would have thought?
- Grue3 7y agoYou can download GIMP which is about the same size, available for the same platforms, and includes a lot more stuff than just a color picker.