Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

gotreasa/rgb_to_hex_conversion_in_python

RGB_to_Hex_Conversion_in_Python

License: AGPL Sonarcloud Status Vulnerabilities Build Status Can I Deploy main to test

Welcome to the Python Template created via a cookiecutter recipe. The project template is designed for a development via a Double Loop approach (BDD-TDD) using pytest and several other pytest libs.

Description

The rgb function is incomplete. Complete it so that passing in RGB decimal values will result in a hexadecimal representation being returned. Valid decimal values for RGB are 0 - 255. Any values that fall out of that range must be rounded to the closest valid value.

Note: Your answer should always be 6 characters long, the shorthand with 3 will not work here.

Examples (input --> output):

255, 255, 255 --> "FFFFFF"
255, 255, 300 --> "FFFFFF"
0, 0, 0       --> "000000"
148, 0, 211   --> "9400D3"

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published