CFX-UI React

Colors

Default colors for themes.

PRIMARY

You can use any color anywhere, all colors change with the theme. If you want to customize your colors, please read Themes to learn more.

import { useTheme } from '@cfxjs/react-ui'

const myComponent = () => {
  const { palette } = useTheme()

  return <p style={{ color: palette.accents_1 }}>myComponent</p>
}
Get palette from useTheme.

Background

theme.palette.background
#fff

Accent 1

theme.palette.accents_1
#fafafa

Accent 2

theme.palette.accents_2
#eaeaea

Accent 3

theme.palette.accents_3
#999

Accent 4

theme.palette.accents_4
#888

Accent 5

theme.palette.accents_5
#666

Accent 6

theme.palette.accents_6
#444

Accent 7

theme.palette.accents_7
#333

Accent 8

theme.palette.accents_8
#111

Foreground

theme.palette.foreground
#000

STATUS

Use different colors to express more emotional changes.

Success

Light

theme.palette.successLight
#effaef

Default

theme.palette.success
#7cd77b

Dark

theme.palette.successDark
#61be75

Error

Light

theme.palette.errorLight
#fbebeb

Default

theme.palette.error
#e15c56

Dark

theme.palette.errorDark
#b34a50

Warning

Light

theme.palette.warningLight
#fef1ea

Default

theme.palette.warning
#ffc438

Dark

theme.palette.warningDark
#fb7a03

Cyan

Lighter

theme.palette.cyanLighter
#aaffec

Light

theme.palette.cyanLight
#79ffe1

Default

theme.palette.cyan
#50e3c2

Dark

theme.palette.cyanDark
#29bc9b

Violet

Lighter

theme.palette.violetLighter
#e3d7fc

Light

theme.palette.violetLight
#8a63d2

Default

theme.palette.violet
#7928ca

Dark

theme.palette.violetDark
#4c2889

Highlight

Alert

theme.palette.alert
#ff0080

Purple

theme.palette.purple
#f81ce5

Violet

theme.palette.magenta
#eb367f