Skip to content

Commit

Permalink
feat: impl themekit client api
Browse files Browse the repository at this point in the history
  • Loading branch information
yarastqt committed Apr 21, 2020
1 parent 30c9ddc commit 24f3f94
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import toColor from 'color'

import { ThemeTokens } from './core/token.h'

export function theme(shape1: ThemeTokens, shape2?: ThemeTokens): ThemeTokens {
return shape1
}

export function color(inputColor: string, options: { h?: number; s?: number; l?: number }): string {
let color = toColor(inputColor)
return color.hsl(options.h, options.s, options.l).hex()
}

0 comments on commit 24f3f94

Please sign in to comment.