murtza

murtza

Hello Elixirians,
I have wrote a very small package to convert binaries into hex colors. please have a look at the code ( https://github.com/murtza/colorify ) and let me know, how i can improve this. i have plans to support other color formats as well. i.e hsl, rgb, rgba etc

I’m into code since more than 17 years. i am following elixir since July 2014 but this is my first try to contribute back to community. if everything goes well, i have plans to write more packages.

thanks you all.

Showing Posts 1 to 8

NobbZ

NobbZ

Besides if the comments I already gave inline, I think you should make more clear that it does not translate strings into colors but creates a hash that can be used as RGB color value in CSS or HTML.

murtza

murtza OP

i have made changes according to your valuable comments. Yeah it can be used to generate colors for css and html. i will update the README in a while. Thanks for the feedback.

alisinabh

alisinabh

Hi @murtza

It is so useful
Btw, i dont feel like installing a hex package for that!
Its more like a Gist to me

Thank you

OvermindDL1

OvermindDL1

Eh, a hex package is best for it, that way updates and fixes are centralized instead of copying in to N number of projects.

Linuus

Linuus

Off topic
I do like packages and DRY but with this mindset you end up with the npm community and left-pad :wink:

Sometimes it’s better to have the code in your project so you can see what it does, update it and so on. Sure with a package you get bug fixes, but new bugs are also introduced when you update the packages. Perhaps the project adds a bunch of new features that you don’t even need and that introduces new bugs in the features you actually care about. If it’s a large project it may be worth it because it would cost you a significant amount of money and time to create the functionality yourself.

I’d rather have 10 lines of code duplicated in a few projects than too many external dependencies.

On topic:
Sorry to hijack the thread with this discussion. :slight_smile: Good job on the project! :+1:

murtza

murtza OP

Hi @alisinabh
It wont be a gist for long because i have plans to add more functionality about generating colors. i.e rgb, rgba, hsl and pastel colors etc. You are an expert but please don’t forget about new comers. I think, these kind of small packages will invite new developers to our community and they can focus on getting things done rapidly.

i completely agree with @OvermindDL1 point of view. You know rails got popular because you can find a gem for almost any kind of task (leaving aside coding standards). If we write good code and focus on the problem, we are going to fix than we will make our life easy. for example Unix’s small libraries.

gon782

gon782

Part of their problem was that you were able to pull the rug out from under a bunch of people and completely change what a library was. This isn’t possible with Hex in any capacity, as far as I know, and so the left-pad debacle shouldn’t be a possible issue.

I also don’t feel like the existence of small packages is something that people should be concerned by. If people want to depend on these small packages, that’s fine: Let them. We don’t all have to have the same exact idea of where the bar for a dependency is.

sotojuan

sotojuan

People who don’t want to have a lot of small dependencies (which, as @gon782 just explained wasn’t the actual problem with npm) can just copy and paste the main module file into their own project. It’s really not something worth arguing about.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews