Skip to content

Commit

Permalink
fix: typescipt errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bart-krakowski committed Jun 15, 2021
1 parent 8839cab commit fafaa6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified packages/.DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions packages/p2/code.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const hslToHex = ({ h, s, l }: HSL) => {
l /= 100
const a = (s * Math.min(l, 1 - l)) / 100
const f = (n) => {
const f = (n: number) => {
const k = (n + h / 30) % 12
const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1)
return Math.round(255 * color)
Expand Down Expand Up @@ -48,8 +48,8 @@ const hslToRgb = ({ h, s, l }: HSL) => {
const rgbToHsl = ({ r, g, b }: RGB) => {
const max = Math.max(r, g, b)
const min = Math.min(r, g, b)
let h
let s
let h: number
let s: number
const l = (max + min) / 2

if (max === min) {
Expand Down

0 comments on commit fafaa6b

Please sign in to comment.