Commit 2efc1fb3 authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

fix(widgets): convert widget colors from hex to hsl (#3239)

* convert widget colors from hex to hsl

* nits
parent 55b37825
...@@ -8,8 +8,8 @@ import { Colors, ComputedTheme } from './theme' ...@@ -8,8 +8,8 @@ import { Colors, ComputedTheme } from './theme'
type DynamicColors = Pick<Colors, 'interactive' | 'outline' | 'primary' | 'secondary' | 'onInteractive'> type DynamicColors = Pick<Colors, 'interactive' | 'outline' | 'primary' | 'secondary' | 'onInteractive'>
const black = '#000000' const black = 'hsl(0, 0%, 0%)'
const white = '#FFFFFF' const white = 'hsl(0, 0%, 100%)'
const light: DynamicColors = { const light: DynamicColors = {
// surface // surface
......
...@@ -14,56 +14,57 @@ export * from './layer' ...@@ -14,56 +14,57 @@ export * from './layer'
export * from './styled' export * from './styled'
export * as ThemedText from './type' export * as ThemedText from './type'
export const brand = '#FF007A' export const brand = 'hsl(331.3, 100%, 50%)'
const stateColors = {
active: 'hsl(215, 79%, 51.4%)',
success: 'hsl(145, 63.4%, 41.8%)',
warning: 'hsl(43, 89.9%, 53.5%)',
error: 'hsl(0, 98%, 62.2%)',
}
export const lightTheme: Colors = { export const lightTheme: Colors = {
// surface // surface
accent: brand, accent: brand,
container: '#F7F8FA', container: 'hsl(220, 23%, 97.5%)',
module: '#E2E3E9', module: 'hsl(231, 14%, 90%)',
interactive: '#CED0D9', interactive: 'hsl(229, 13%, 83%)',
outline: '#C3C5CB', outline: 'hsl(225, 7%, 78%)',
dialog: '#FFFFFF', dialog: 'hsl(0, 0%, 100%)',
// text // text
onAccent: '#ffffff', onAccent: 'hsl(0, 0%, 100%)',
primary: '#000000', primary: 'hsl(0, 0%, 0%)',
secondary: '#565A69', secondary: 'hsl(227, 10%, 37.5%)',
hint: '#888D9B', hint: 'hsl(224, 9%, 57%)',
onInteractive: '#000000', onInteractive: 'hsl(0, 0%, 0%)',
// state // state
active: '#2172E5', ...stateColors,
success: '#27AE60',
warning: '#F3B71E',
error: '#FD4040',
currentColor: 'currentColor', currentColor: 'currentColor',
} }
const darkThemeAccent = '#2172E5' const darkThemeAccent = 'hsl(215, 79%, 51.4%)'
export const darkTheme: Colors = { export const darkTheme: Colors = {
// surface // surface
accent: darkThemeAccent, accent: darkThemeAccent,
container: '#191B1F', container: 'hsl(220, 10.7%, 11%)',
module: '#2C2F36', module: 'hsl(222, 10.2%, 19.2%)',
interactive: '#40444F', interactive: 'hsl(224, 10.5%, 281%)',
outline: '#565A69', outline: 'hsl(227, 10%, 37.5%)',
dialog: '#000000', dialog: 'hsl(0, 0%, 0%)',
// text // text
onAccent: readableColor(darkThemeAccent), onAccent: readableColor(darkThemeAccent),
primary: '#FFFFFF', primary: 'hsl(0, 0%, 100%)',
secondary: '#888D9B', secondary: 'hsl(224, 8.7%, 57.1%)',
hint: '#6C7284', hint: 'hsl(225, 10%, 47.1%)',
onInteractive: '#FFFFFF', onInteractive: 'hsl(0, 0%, 100%)',
// state // state
active: '#2172E5', ...stateColors,
success: '#27AE60',
warning: '#F3B71E',
error: '#FD4040',
currentColor: 'currentColor', currentColor: 'currentColor',
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment