Apply new format to snippets and template

This commit is contained in:
Angelos Chalaris
2020-09-15 16:13:06 +03:00
parent 39d3711994
commit a9aeadad64
117 changed files with 170 additions and 175 deletions

View File

@ -5,8 +5,8 @@ tags: string,math,intermediate
Converts a hexadecimal color code to a tuple of integers corresponding to its RGB components.
Use a list comprehension in combination with `int()` and list slice notation to get the RGB components from the hexadecimal string.
Use `tuple()` to convert the resulting list to a tuple.
- Use a list comprehension in combination with `int()` and list slice notation to get the RGB components from the hexadecimal string.
- Use `tuple()` to convert the resulting list to a tuple.
```py
def hex_to_rgb(hex):