import { FC } from 'react' import styled from 'styled-components' import { CSSExportButton, TokenExportButton } from './Export' export const Help: FC = () => ( ) const Export: FC = () => (

Exports

Figma. Install{' '} Figma Tokens . Run the plugin and open JSON tab. Copy tokens and paste there.

) const Hotkeys = () => { const isWin = navigator.platform.toUpperCase().indexOf('WIN') >= 0 const MetaKey = () => (isWin ? Ctrl : ⌘) return (

Hotkeys

  • 1 - 9 — switch palette
  • ↑ ↓ → ← — select another color
  • + ↑ ↓ → ← — move rows and columns
  • + ⇧ + ↑ ↓ →{' '} ← — duplicate rows and columns
  • L + ↑ ↓ — change lightness of selected color
  • C + ↑ ↓ — change chroma of selected color
  • H + ↑ ↓ — change hue of selected color
  • + C — copy selected color as hex.
  • + ⇧ + C — copy selected color in{' '} lch() format. Note that it has limited{' '} browser support.
  • + V — paste color. Just copy color in any format and paste it here.
  • Hold B — preview palette in greys.
  • ) } const Credits = () => (

    Credits

    Made by Alexey Ardov. Contact me if you have any suggestions.

    Huetone is heavily inspired by{' '} that Stripe article . And it uses the great{' '} chroma.js library under the hood.

    Special thanks for{' '} Lea Verou,{' '} Chris Lilley and the CSS working group for providing all the essential code for color conversions.

    Accessible Perceptual Contrast Algorithm (APCA) by Andrew Somers is a WCAG 3 working draft and may change later. To learn more visit{' '} this page {' '} or check{' '} this thread on GitHub .

    ) const Wrapper = styled.div` margin-top: 24px; ` const Section = styled.section` font-size: 16px; margin-bottom: 24px; p { max-width: 60ch; margin-top: 12px; } ` const List = styled.ul` padding-left: 0; & > li { margin-top: 12px; } & > li:first-child { margin-top: 0; } ` const Key = styled.span` display: inline-block; padding: 0px 0px; text-align: center; min-width: 28px; border-radius: 4px; background-color: var(--c-btn-bg); border: 1px solid var(--c-divider); ` const Link = styled.a` color: inherit; text-decoration-color: var(--c-text-secondary); :hover { color: var(--c-text-primary); text-decoration: none; } ` const Code = styled.code` /* background-color: #eee; */ border: 1px solid var(--c-divider); border-radius: var(--radius-m); font-family: courier, monospace; padding: 0 3px; `