Git Product home page Git Product logo

convert_color_codes's Introduction

Miracle Apata

Software Engineer

  • Mobile App (Flutter).
  • Desktop GUI (PySide).
  • Web Backend / Server (Django, Flask).
  • REST API Backend / Server (FastAPI).
  • Web scraping.
  • Data Visualisation.
  • System Administration, Scripting, and Automation.

Programming Languages

  • Python
  • Dart
  • JavaScript
  • HTML & CSS
  • C#
  • Java
  • C, C++

Technologies and Frameworks

  • Django, Flask, FastAPI
  • Flutter
  • Qt for Python (PySide & PyQt)
  • BeautifulSoup, Selenium, Scrapy
  • Plotly, Matplotib, numpy, pandas

Databases

  • Microsoft Azure
  • Firebase Realtime Database
  • Firebase Cloud Database
  • MongoDB
  • MySQL
  • Amazon AWS

convert_color_codes's People

Contributors

niccokunzmann avatar prmpsmart avatar

Watchers

 avatar

Forkers

niccokunzmann

convert_color_codes's Issues

Edge cases

Hi,

I wanted to convert some values and these are edge cases that fail:

>>> hex2hsl("#FFFFFF")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sabin/convert_color_codes/src/convert_color_codes.py", line 126, in hex2hsl
    return rgb2hsl(r, g, b)
  File "/home/sabin/convert_color_codes/src/convert_color_codes.py", line 75, in rgb2hsl
    s = d / (1 - abs((2 * l) - 1))
ZeroDivisionError: float division by zero
>>> hex2cmyk("#000000")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sabin/convert_color_codes/src/convert_color_codes.py", line 139, in hex2cmyk
    return rgb2cmyk(r, g, b)
  File "/home/sabin/convert_color_codes/src/convert_color_codes.py", line 100, in rgb2cmyk
    c = lbd(r)
  File "/home/sabin/convert_color_codes/src/convert_color_codes.py", line 99, in <lambda>
    lbd = lambda value: (k1 - (value / TFF)) / k1
ZeroDivisionError: float division by zero
>>> hex2cmyk("#000001")
(1.0, 1.0, -3.538835890992699e-15, 0.996078431372549)
>>> -3.538835890992699e-15 < 0
True

If you need help with proper testing, that is what I know how to do.

Type declarations are off

Hi, the type declarations seem to be a little off.
Sometimes, floats come back but int is declared.

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.