Format snippets

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-11-03 22:11:18 +02:00
parent 15dcd4d184
commit 05e3f6dc07
13 changed files with 42 additions and 26 deletions

View File

@ -9,7 +9,8 @@ Converts the values of RGB components to a hexadecimal color code.
- Use `String.prototype.padStart(6, '0')` to get a 6-digit hexadecimal value.
```js
const RGBToHex = (r, g, b) => ((r << 16) + (g << 8) + b).toString(16).padStart(6, '0');
const RGBToHex = (r, g, b) =>
((r << 16) + (g << 8) + b).toString(16).padStart(6, '0');
```
```js