Skip to content

Commit

Permalink
feat: override the color variables in tailwind.css with antd's color …
Browse files Browse the repository at this point in the history
…variables
  • Loading branch information
condorheroblog committed Nov 14, 2024
1 parent 365d4c2 commit 036acea
Show file tree
Hide file tree
Showing 24 changed files with 385 additions and 130 deletions.
2 changes: 2 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export default function App() {
input={{ autoComplete: "off" }}
locale={getAntdLocale()}
theme={{
cssVar: true,
hashed: false,
algorithm:
isDark
? antdTheme.darkAlgorithm
Expand Down
124 changes: 124 additions & 0 deletions src/components/antd-app/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// CSS 变量前缀
export const prefix = "oo";
// 基础色
export const colors = [
"blue",
"purple",
"cyan",
"green",
"magenta",
"pink",
"red",
"orange",
"yellow",
"volcano",
"geekblue",
"gold",
"lime",
];
// 品牌色
export const brandColors = [
"colorPrimary",
"colorPrimaryBg",
"colorPrimaryBgHover",
"colorPrimaryBorder",
"colorPrimaryBorderHover",
"colorPrimaryHover",
"colorPrimaryActive",
"colorPrimaryTextHover",
"colorPrimaryText",
"colorPrimaryTextActive",
];
// 成功色
export const successColors = [
"colorSuccess",
"colorSuccessBg",
"colorSuccessBgHover",
"colorSuccessBorder",
"colorSuccessBorderHover",
"colorSuccessHover",
"colorSuccessActive",
"colorSuccessTextHover",
"colorSuccessText",
"colorSuccessTextActive",
];
// 警告色
export const warningColors = [
"colorWarning",
"colorWarningBg",
"colorWarningBgHover",
"colorWarningBorder",
"colorWarningBorderHover",
"colorWarningHover",
"colorWarningActive",
"colorWarningTextHover",
"colorWarningText",
"colorWarningTextActive",
];
// 错误色
export const errorColors = [
"colorError",
"colorErrorBg",
"colorErrorBgHover",
"colorErrorBorder",
"colorErrorBorderHover",
"colorErrorHover",
"colorErrorActive",
"colorErrorTextHover",
"colorErrorText",
"colorErrorTextActive",
];
// 信息色
export const infoColors = [
"colorInfo",
"colorInfoBg",
"colorInfoBgHover",
"colorInfoBorder",
"colorInfoBorderHover",
"colorInfoHover",
"colorInfoActive",
"colorInfoTextHover",
"colorInfoText",
"colorInfoTextActive",
];
// 功能性色
export const functionalColors = [
...successColors,
...warningColors,
...errorColors,
...infoColors,
];
// 中性色
export const neutralColors = [
"colorText",
"colorTextSecondary",
"colorTextTertiary",
"colorTextQuaternary",
// 组件容器背景色
"colorBgContainer",
"colorBgElevated",
// 布局背景色
"colorBgLayout",

"colorBgSpotlight",
"colorBgMask",
// 边框色
"colorBorder",
"colorBorderSecondary",
// 填充色
"colorFill",
"colorFillSecondary",
"colorFillTertiary",
"colorFillQuaternary",
];
export const productLevelColorSystem = [
...brandColors,
...functionalColors,
];
export const colorPaletteNumbers = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
export const colorVariantsCount = 10;

// ['blue', 'blue-1', 'blue-2', ……, 'blue-10', 'purple',……]
export const colorPalettes = colors.flatMap(color =>
[color, ...Array.from({ length: colorVariantsCount }, (_, i) => `${color}-${i + 1}`)],
);
16 changes: 15 additions & 1 deletion src/components/antd-app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import type { ReactNode } from "react";

import { StaticAntd } from "#src/utils";
import { App } from "antd";

import { theme as antdTheme, App } from "antd";
import { useEffect } from "react";

import { setupAntdThemeTokensToHtml } from "./setup-antd-theme";

export interface AntdAppProps {
children: ReactNode
}

export function AntdApp({ children }: AntdAppProps) {
const { token: antdTokens } = antdTheme.useToken();

useEffect(() => {
/* 打印查看支持的 token */
// console.log("antdTokens", antdTokens);
setupAntdThemeTokensToHtml(antdTokens);
}, [antdTokens]);

return (
<App className="h-full">
<StaticAntd />
Expand Down
54 changes: 54 additions & 0 deletions src/components/antd-app/setup-antd-theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import type { GlobalToken } from "antd";
import { colorPalettes, neutralColors, prefix, productLevelColorSystem } from "./constants";

/**
* 16 进制颜色值转 RGB 颜色值,因为 16 进制的颜色值在 tailwind 中不支持透明度,比如无法使用 bg-blue-500/20
* @see https://tailwindcss.com/docs/customizing-colors#using-css-variables
*/
function hexToRGB(hex: string) {
// 移除可能存在的 # 号
hex = hex.replace("#", "");

// 获取 R、G、B 的值
const r = Number.parseInt(hex.substring(0, 2), 16);
const g = Number.parseInt(hex.substring(2, 4), 16);
const b = Number.parseInt(hex.substring(4, 6), 16);

return `${r} ${g} ${b}`;
}

// 判断是否是 RGB 颜色值
function isRGBColor(color: string) {
return color.trim().startsWith("rgb");
}

export function getCSSVariablesByTokens(tokens: GlobalToken) {
return Object.entries(tokens)
.reduce((acc, [key, value]): string => {
// 功能色系,不包含中性色系
if (productLevelColorSystem.includes(key)) {
const rgb = hexToRGB(value);
return `${acc}--${prefix}-${key}:${rgb};`;
}

// 中性色系
if (neutralColors.includes(key)) {
// 如果颜色值是 rgb 格式,则直接使用
const rgb = isRGBColor(value) ? value : `rgb(${hexToRGB(value)})`;
return `${acc}--${prefix}-${key}:${rgb};`;
}
// 色板
return colorPalettes.includes(key) ? `${acc}--${prefix}-${key}:${hexToRGB(value)};` : acc;
}, "");
}

/** Setup antd theme tokens to html */
export function setupAntdThemeTokensToHtml(antdTokens: GlobalToken) {
const cssVariablesString = getCSSVariablesByTokens(antdTokens);

const styleId = "antd-theme-tokens";
const styleSheet = document.querySelector(`#${styleId}`) || document.createElement("style");
styleSheet.id = styleId;
styleSheet.textContent = `:root { ${cssVariablesString} }`;
document.head.appendChild(styleSheet);
}
2 changes: 1 addition & 1 deletion src/components/fullscreen-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { FullscreenExitOutlined, FullscreenOutlined } from "@ant-design/icons";

import { useFullscreen } from "ahooks";

interface FullscreenButtonProps extends Omit<ButtonProps, "target"> {
export interface FullscreenButtonProps extends Omit<ButtonProps, "target"> {
target: HTMLElement | (() => Element) | RefObject<Element>
fullscreenIcon?: React.ReactNode
fullscreenExitIcon?: React.ReactNode
Expand Down
2 changes: 1 addition & 1 deletion src/layout/container-layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default function ContainerLayout() {

<LayoutContent />

<LayoutFooter />
<LayoutFooter className="bg-colorBgContainer" />
</section>
</LayoutContext.Provider>
);
Expand Down
12 changes: 10 additions & 2 deletions src/layout/layout-footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
export default function LayoutFooter() {
import { cn } from "#src/utils";

interface LayoutFooterProps {
className?: string
}
export default function LayoutFooter({ className }: LayoutFooterProps) {
return (
<footer
className="h-10 flex-shrink-0 flex items-center justify-center text-xs md:text-sm dark:bg-black"
className={cn(
"h-10 flex-shrink-0 flex items-center justify-center text-xs md:text-sm",
className,
)}
>
Copyright &copy; 2023 Condor Hero All right reserved
</footer>
Expand Down
11 changes: 3 additions & 8 deletions src/layout/layout-header/components/fullscreen-button.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import type { MutableRefObject } from "react";
import type { FullscreenButtonProps } from "#src/components";

import { FullscreenButton as FullscreenButtonComponent, FullscreenExitIcon, FullscreenIcon } from "#src/components";

interface FullscreenProps {
target: HTMLElement | (() => Element) | MutableRefObject<Element>
}

export function FullscreenButton({ target }: FullscreenProps) {
export function FullscreenButton({ target, ...restProps }: FullscreenButtonProps) {
return (
<FullscreenButtonComponent
size="large"
className="rounded-none"
{...restProps}
target={target}
fullscreenExitIcon={<FullscreenExitIcon />}
fullscreenIcon={<FullscreenIcon />}
Expand Down
18 changes: 9 additions & 9 deletions src/layout/layout-header/components/language-button.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import type { LanguageType } from "#src/locales";
import type { MenuProps } from "antd";
import type { ButtonProps, MenuProps } from "antd";

import { BasicButton } from "#src/components";
import { useLanguage } from "#src/hooks";
import { cn } from "#src/utils";

import { TranslationOutlined } from "@ant-design/icons";
import { Dropdown } from "antd";

interface LanguageButtonProps {
className?: string
}

export function LanguageButton({ className }: LanguageButtonProps) {
export function LanguageButton({ ...restProps }: ButtonProps) {
const { language, setLanguage } = useLanguage();

const items: MenuProps["items"] = [
Expand Down Expand Up @@ -40,9 +37,12 @@ export function LanguageButton({ className }: LanguageButtonProps) {
arrow={false}
placement="bottom"
>
<div role="menuitem" tabIndex={-1} className={cn("text-lg", className)}>
<BasicButton
type="text"
{...restProps}
>
<TranslationOutlined />
</div>
</BasicButton>
</Dropdown>
);
}
10 changes: 6 additions & 4 deletions src/layout/layout-header/components/theme-button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { ButtonProps } from "antd";

import { BasicButton } from "#src/components";
import { usePreferences } from "#src/hooks";
import { MoonIcon, SunIcon } from "#src/icons";
Expand All @@ -9,16 +11,16 @@ import { MoonIcon, SunIcon } from "#src/icons";
* Theme Button Component
* Allows users to toggle between light and dark themes of the website via a button
*/
export function ThemeButton() {
export function ThemeButton({ ...restProps }: ButtonProps) {
const { isLight, changeSiteTheme } = usePreferences();

return (
<BasicButton
type="text"
size="large"
className="transition-colors rounded-none"
{...restProps}
icon={isLight ? <MoonIcon /> : <SunIcon />}
onPointerDown={() => {
onPointerDown={(e) => {
restProps?.onPointerDown?.(e);
changeSiteTheme(isLight ? "dark" : "light");
}}
/>
Expand Down
16 changes: 11 additions & 5 deletions src/layout/layout-header/components/user-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import type { MenuProps } from "antd";
import type { ButtonProps, MenuProps } from "antd";

import { BasicButton } from "#src/components";
import { UserCircleIcon } from "#src/icons";
import { $t } from "#src/locales";
import { useAuthStore, useUserStore } from "#src/store";
import { isWindowsOs } from "#src/utils";
import { cn, isWindowsOs } from "#src/utils";

import { LogoutOutlined } from "@ant-design/icons";
import { useKeyPress } from "ahooks";
import { Avatar, Dropdown } from "antd";
import { useMemo } from "react";
import { useNavigate } from "react-router-dom";

export function UserMenu() {
export function UserMenu({ ...restProps }: ButtonProps) {
const navigate = useNavigate();
const avatar = useUserStore(state => state.avatar);
const logout = useAuthStore(state => state.logout);
Expand Down Expand Up @@ -56,9 +58,13 @@ export function UserMenu() {
placement="bottomRight"
trigger={["click"]}
>
<div role="menuitem" tabIndex={-1}>
<BasicButton
type="text"
{...restProps}
className={cn(restProps.className, "rounded-full px-1")}
>
<Avatar src={avatar} />
</div>
</BasicButton>
</Dropdown>
);
}
Loading

3 comments on commit 036acea

@condorheroblog
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更加友好的主题展示:

Dark Mode
Light model

使用 antd 的颜色系统和断点系统覆盖 tailwind.css 的样式系统,从而保证系统风格的统一性。

  1. 基础色板 https://ant.design/docs/spec/colors#base-color-palettes
  2. 品牌色板、功能色板、中性色板

截图来自 https://kitchen.alipay.com/ 插件。

Brand Color
Success Color
Warning Color
Error Color
Info Color
Neutral Color

 Preview

@condorheroblog
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

覆盖 tailwind.css 的颜色值之后,新的可获得的颜色如下,使用的时候取下面对象的 key 即可,比如 bg-blue-50,还可以和透明度结合使用,例如 bg-blue-50/20

{
  "blue-50":"rgb(var(--oo-blue))",
  "blue-100":"rgb(var(--oo-blue-1))",
  "blue-200":"rgb(var(--oo-blue-2))",
  "blue-300":"rgb(var(--oo-blue-3))",
  "blue-400":"rgb(var(--oo-blue-4))",
  "blue-500":"rgb(var(--oo-blue-5))",
  "blue-600":"rgb(var(--oo-blue-6))",
  "blue-700":"rgb(var(--oo-blue-7))",
  "blue-800":"rgb(var(--oo-blue-8))",
  "blue-900":"rgb(var(--oo-blue-9))",
  "blue-950":"rgb(var(--oo-blue-10))",
  "purple-50":"rgb(var(--oo-purple))",
  "purple-100":"rgb(var(--oo-purple-1))",
  "purple-200":"rgb(var(--oo-purple-2))",
  "purple-300":"rgb(var(--oo-purple-3))",
  "purple-400":"rgb(var(--oo-purple-4))",
  "purple-500":"rgb(var(--oo-purple-5))",
  "purple-600":"rgb(var(--oo-purple-6))",
  "purple-700":"rgb(var(--oo-purple-7))",
  "purple-800":"rgb(var(--oo-purple-8))",
  "purple-900":"rgb(var(--oo-purple-9))",
  "purple-950":"rgb(var(--oo-purple-10))",
  "cyan-50":"rgb(var(--oo-cyan))",
  "cyan-100":"rgb(var(--oo-cyan-1))",
  "cyan-200":"rgb(var(--oo-cyan-2))",
  "cyan-300":"rgb(var(--oo-cyan-3))",
  "cyan-400":"rgb(var(--oo-cyan-4))",
  "cyan-500":"rgb(var(--oo-cyan-5))",
  "cyan-600":"rgb(var(--oo-cyan-6))",
  "cyan-700":"rgb(var(--oo-cyan-7))",
  "cyan-800":"rgb(var(--oo-cyan-8))",
  "cyan-900":"rgb(var(--oo-cyan-9))",
  "cyan-950":"rgb(var(--oo-cyan-10))",
  "green-50":"rgb(var(--oo-green))",
  "green-100":"rgb(var(--oo-green-1))",
  "green-200":"rgb(var(--oo-green-2))",
  "green-300":"rgb(var(--oo-green-3))",
  "green-400":"rgb(var(--oo-green-4))",
  "green-500":"rgb(var(--oo-green-5))",
  "green-600":"rgb(var(--oo-green-6))",
  "green-700":"rgb(var(--oo-green-7))",
  "green-800":"rgb(var(--oo-green-8))",
  "green-900":"rgb(var(--oo-green-9))",
  "green-950":"rgb(var(--oo-green-10))",
  "magenta-50":"rgb(var(--oo-magenta))",
  "magenta-100":"rgb(var(--oo-magenta-1))",
  "magenta-200":"rgb(var(--oo-magenta-2))",
  "magenta-300":"rgb(var(--oo-magenta-3))",
  "magenta-400":"rgb(var(--oo-magenta-4))",
  "magenta-500":"rgb(var(--oo-magenta-5))",
  "magenta-600":"rgb(var(--oo-magenta-6))",
  "magenta-700":"rgb(var(--oo-magenta-7))",
  "magenta-800":"rgb(var(--oo-magenta-8))",
  "magenta-900":"rgb(var(--oo-magenta-9))",
  "magenta-950":"rgb(var(--oo-magenta-10))",
  "pink-50":"rgb(var(--oo-pink))",
  "pink-100":"rgb(var(--oo-pink-1))",
  "pink-200":"rgb(var(--oo-pink-2))",
  "pink-300":"rgb(var(--oo-pink-3))",
  "pink-400":"rgb(var(--oo-pink-4))",
  "pink-500":"rgb(var(--oo-pink-5))",
  "pink-600":"rgb(var(--oo-pink-6))",
  "pink-700":"rgb(var(--oo-pink-7))",
  "pink-800":"rgb(var(--oo-pink-8))",
  "pink-900":"rgb(var(--oo-pink-9))",
  "pink-950":"rgb(var(--oo-pink-10))",
  "red-50":"rgb(var(--oo-red))",
  "red-100":"rgb(var(--oo-red-1))",
  "red-200":"rgb(var(--oo-red-2))",
  "red-300":"rgb(var(--oo-red-3))",
  "red-400":"rgb(var(--oo-red-4))",
  "red-500":"rgb(var(--oo-red-5))",
  "red-600":"rgb(var(--oo-red-6))",
  "red-700":"rgb(var(--oo-red-7))",
  "red-800":"rgb(var(--oo-red-8))",
  "red-900":"rgb(var(--oo-red-9))",
  "red-950":"rgb(var(--oo-red-10))",
  "orange-50":"rgb(var(--oo-orange))",
  "orange-100":"rgb(var(--oo-orange-1))",
  "orange-200":"rgb(var(--oo-orange-2))",
  "orange-300":"rgb(var(--oo-orange-3))",
  "orange-400":"rgb(var(--oo-orange-4))",
  "orange-500":"rgb(var(--oo-orange-5))",
  "orange-600":"rgb(var(--oo-orange-6))",
  "orange-700":"rgb(var(--oo-orange-7))",
  "orange-800":"rgb(var(--oo-orange-8))",
  "orange-900":"rgb(var(--oo-orange-9))",
  "orange-950":"rgb(var(--oo-orange-10))",
  "yellow-50":"rgb(var(--oo-yellow))",
  "yellow-100":"rgb(var(--oo-yellow-1))",
  "yellow-200":"rgb(var(--oo-yellow-2))",
  "yellow-300":"rgb(var(--oo-yellow-3))",
  "yellow-400":"rgb(var(--oo-yellow-4))",
  "yellow-500":"rgb(var(--oo-yellow-5))",
  "yellow-600":"rgb(var(--oo-yellow-6))",
  "yellow-700":"rgb(var(--oo-yellow-7))",
  "yellow-800":"rgb(var(--oo-yellow-8))",
  "yellow-900":"rgb(var(--oo-yellow-9))",
  "yellow-950":"rgb(var(--oo-yellow-10))",
  "volcano-50":"rgb(var(--oo-volcano))",
  "volcano-100":"rgb(var(--oo-volcano-1))",
  "volcano-200":"rgb(var(--oo-volcano-2))",
  "volcano-300":"rgb(var(--oo-volcano-3))",
  "volcano-400":"rgb(var(--oo-volcano-4))",
  "volcano-500":"rgb(var(--oo-volcano-5))",
  "volcano-600":"rgb(var(--oo-volcano-6))",
  "volcano-700":"rgb(var(--oo-volcano-7))",
  "volcano-800":"rgb(var(--oo-volcano-8))",
  "volcano-900":"rgb(var(--oo-volcano-9))",
  "volcano-950":"rgb(var(--oo-volcano-10))",
  "geekblue-50":"rgb(var(--oo-geekblue))",
  "geekblue-100":"rgb(var(--oo-geekblue-1))",
  "geekblue-200":"rgb(var(--oo-geekblue-2))",
  "geekblue-300":"rgb(var(--oo-geekblue-3))",
  "geekblue-400":"rgb(var(--oo-geekblue-4))",
  "geekblue-500":"rgb(var(--oo-geekblue-5))",
  "geekblue-600":"rgb(var(--oo-geekblue-6))",
  "geekblue-700":"rgb(var(--oo-geekblue-7))",
  "geekblue-800":"rgb(var(--oo-geekblue-8))",
  "geekblue-900":"rgb(var(--oo-geekblue-9))",
  "geekblue-950":"rgb(var(--oo-geekblue-10))",
  "gold-50":"rgb(var(--oo-gold))",
  "gold-100":"rgb(var(--oo-gold-1))",
  "gold-200":"rgb(var(--oo-gold-2))",
  "gold-300":"rgb(var(--oo-gold-3))",
  "gold-400":"rgb(var(--oo-gold-4))",
  "gold-500":"rgb(var(--oo-gold-5))",
  "gold-600":"rgb(var(--oo-gold-6))",
  "gold-700":"rgb(var(--oo-gold-7))",
  "gold-800":"rgb(var(--oo-gold-8))",
  "gold-900":"rgb(var(--oo-gold-9))",
  "gold-950":"rgb(var(--oo-gold-10))",
  "lime-50":"rgb(var(--oo-lime))",
  "lime-100":"rgb(var(--oo-lime-1))",
  "lime-200":"rgb(var(--oo-lime-2))",
  "lime-300":"rgb(var(--oo-lime-3))",
  "lime-400":"rgb(var(--oo-lime-4))",
  "lime-500":"rgb(var(--oo-lime-5))",
  "lime-600":"rgb(var(--oo-lime-6))",
  "lime-700":"rgb(var(--oo-lime-7))",
  "lime-800":"rgb(var(--oo-lime-8))",
  "lime-900":"rgb(var(--oo-lime-9))",
  "lime-950":"rgb(var(--oo-lime-10))",
  "primary":"rgb(var(--oo-colorPrimary))",
  "primaryBg":"rgb(var(--oo-colorPrimaryBg))",
  "primaryBgHover":"rgb(var(--oo-colorPrimaryBgHover))",
  "primaryBorder":"rgb(var(--oo-colorPrimaryBorder))",
  "primaryBorderHover":"rgb(var(--oo-colorPrimaryBorderHover))",
  "primaryHover":"rgb(var(--oo-colorPrimaryHover))",
  "primaryActive":"rgb(var(--oo-colorPrimaryActive))",
  "primaryTextHover":"rgb(var(--oo-colorPrimaryTextHover))",
  "primaryText":"rgb(var(--oo-colorPrimaryText))",
  "primaryTextActive":"rgb(var(--oo-colorPrimaryTextActive))",
  "success":"rgb(var(--oo-colorSuccess))",
  "successBg":"rgb(var(--oo-colorSuccessBg))",
  "successBgHover":"rgb(var(--oo-colorSuccessBgHover))",
  "successBorder":"rgb(var(--oo-colorSuccessBorder))",
  "successBorderHover":"rgb(var(--oo-colorSuccessBorderHover))",
  "successHover":"rgb(var(--oo-colorSuccessHover))",
  "successActive":"rgb(var(--oo-colorSuccessActive))",
  "successTextHover":"rgb(var(--oo-colorSuccessTextHover))",
  "successText":"rgb(var(--oo-colorSuccessText))",
  "successTextActive":"rgb(var(--oo-colorSuccessTextActive))",
  "warning":"rgb(var(--oo-colorWarning))",
  "warningBg":"rgb(var(--oo-colorWarningBg))",
  "warningBgHover":"rgb(var(--oo-colorWarningBgHover))",
  "warningBorder":"rgb(var(--oo-colorWarningBorder))",
  "warningBorderHover":"rgb(var(--oo-colorWarningBorderHover))",
  "warningHover":"rgb(var(--oo-colorWarningHover))",
  "warningActive":"rgb(var(--oo-colorWarningActive))",
  "warningTextHover":"rgb(var(--oo-colorWarningTextHover))",
  "warningText":"rgb(var(--oo-colorWarningText))",
  "warningTextActive":"rgb(var(--oo-colorWarningTextActive))",
  "error":"rgb(var(--oo-colorError))",
  "errorBg":"rgb(var(--oo-colorErrorBg))",
  "errorBgHover":"rgb(var(--oo-colorErrorBgHover))",
  "errorBorder":"rgb(var(--oo-colorErrorBorder))",
  "errorBorderHover":"rgb(var(--oo-colorErrorBorderHover))",
  "errorHover":"rgb(var(--oo-colorErrorHover))",
  "errorActive":"rgb(var(--oo-colorErrorActive))",
  "errorTextHover":"rgb(var(--oo-colorErrorTextHover))",
  "errorText":"rgb(var(--oo-colorErrorText))",
  "errorTextActive":"rgb(var(--oo-colorErrorTextActive))",
  "info":"rgb(var(--oo-colorInfo))",
  "infoBg":"rgb(var(--oo-colorInfoBg))",
  "infoBgHover":"rgb(var(--oo-colorInfoBgHover))",
  "infoBorder":"rgb(var(--oo-colorInfoBorder))",
  "infoBorderHover":"rgb(var(--oo-colorInfoBorderHover))",
  "infoHover":"rgb(var(--oo-colorInfoHover))",
  "infoActive":"rgb(var(--oo-colorInfoActive))",
  "infoTextHover":"rgb(var(--oo-colorInfoTextHover))",
  "infoText":"rgb(var(--oo-colorInfoText))",
  "infoTextActive":"rgb(var(--oo-colorInfoTextActive))",
  "colorText":"var(--oo-colorText)",
  "colorTextSecondary":"var(--oo-colorTextSecondary)",
  "colorTextTertiary":"var(--oo-colorTextTertiary)",
  "colorTextQuaternary":"var(--oo-colorTextQuaternary)",
  "colorBgContainer":"var(--oo-colorBgContainer)",
  "colorBgElevated":"var(--oo-colorBgElevated)",
  "colorBgLayout":"var(--oo-colorBgLayout)",
  "colorBgSpotlight":"var(--oo-colorBgSpotlight)",
  "colorBgMask":"var(--oo-colorBgMask)",
  "colorBorder":"var(--oo-colorBorder)",
  "colorBorderSecondary":"var(--oo-colorBorderSecondary)",
  "colorFill":"var(--oo-colorFill)",
  "colorFillSecondary":"var(--oo-colorFillSecondary)",
  "colorFillTertiary":"var(--oo-colorFillTertiary)",
  "colorFillQuaternary":"var(--oo-colorFillQuaternary)"
}

@condorheroblog
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中性色板

d4a7931

Please sign in to comment.