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 the values of RGB components to a hexadecimal color code.
Create a placeholder for a zero-padded hexadecimal value using `"{:02X}"`, copy it three times.
Use `str.format()` on the resulting string to replace the placeholders with the given values.
- Create a placeholder for a zero-padded hexadecimal value using `"{:02X}"`, copy it three times.
- Use `str.format()` on the resulting string to replace the placeholders with the given values.
```py
def rgb_to_hex(r, g, b):