Git Product home page Git Product logo

color_utils's People

Contributors

barakyo avatar ehtb avatar hauntedhost avatar tyre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

color_utils's Issues

Failure when using lower case hex strings

iex > ColorUtils.hex_to_rgb("#C8C8C8")
%ColorUtils.RGB{blue: 200.0, green: 200.0, red: 200.0}

iex > ColorUtils.hex_to_rgb("#c8c8c8")
** (ArithmeticError) bad argument in arithmetic expression
             lib/color_utils.ex:260: anonymous fn/1 in ColorUtils.hex_to_decimal/1
    (elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
             lib/color_utils.ex:256: ColorUtils.hex_to_decimal/1
             lib/color_utils.ex:65: ColorUtils.hex_to_rgb/1

RGB to HEX not working

  1. Thanks!
  2. ColorUtils.rgb_to_hex(%ColorUtils.RGB{blue: 22, green: 117, red: 87}) is causing an ArgumentError: lib/color_utils.ex:287: ColorUtils.decimal_to_hex/2

Any idea how this can be fixed?

Add method for YIQ

I would love to add a method for calculating the YIQ to this library. Are you interested in something like this?

Push to Hex.PM

Hey, thanks for putting together this library. I noticed version 0.2.1, which fixes RGB to HEX conversion is on GitHub, but not on hex.pm, which only has 0.2.0.

Any chance it could be pushed up?

Thanks in advance :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.