> ## Documentation Index
> Fetch the complete documentation index at: https://craft-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 自定义块颜色

> 在 Craft 中使用块颜色调色板、选取完全自定义的块颜色，并设置您自己的默认块颜色。

块颜色是让内容脱颖而出的简单方式，非常适合制作强调框、为章节做颜色分类，或为页面增添个性。块颜色调色板提供了覆盖整个色谱的均衡配色，如果没有完全合适的颜色，您还可以完全自定义。

## 应用块颜色

<Steps>
  <Step title="选中一个块">
    点击您想上色的块，也可以一次选中多个块。

    <img src="https://mintcdn.com/craft-support/bFuq7qeKyFxnmv1W/images/write-and-edit/styling/block-colors/en/content/apply-block-color-step-1.png?fit=max&auto=format&n=bFuq7qeKyFxnmv1W&q=85&s=89e724af9695db974901a249c837bc30" alt="选中一个块" width="928" height="759" data-path="images/write-and-edit/styling/block-colors/en/content/apply-block-color-step-1.png" />
  </Step>

  <Step title="打开格式面板">
    打开右侧边栏，选择**格式**标签页。
  </Step>

  <Step title="选取块颜色">
    在**装饰**下选择**块**，然后从**颜色**调色板中选取一种颜色。将鼠标悬停在任意颜色上，即可在工具提示中查看其名称。

    <img src="https://mintcdn.com/craft-support/bFuq7qeKyFxnmv1W/images/write-and-edit/styling/block-colors/en/content/apply-block-color-step-2.png?fit=max&auto=format&n=bFuq7qeKyFxnmv1W&q=85&s=e293e198ba0c255b778adb624533e85b" alt="显示块装饰和颜色调色板的格式面板" width="928" height="759" data-path="images/write-and-edit/styling/block-colors/en/content/apply-block-color-step-2.png" />
  </Step>
</Steps>

在所有可以选择块颜色的地方（包括斜杠命令菜单），显示的都是同一套调色板，因此无论从哪里应用，颜色的效果都完全一致。

## 选取自定义块颜色

想要调色板中没有的色调？

<Steps>
  <Step title="打开取色器">
    选择块颜色调色板末尾的自定义颜色选项。
  </Step>

  <Step title="选择色调">
    浏览色调网格、在色谱中选取，或使用滑块微调。
  </Step>

  <Step title="或输入精确数值">
    输入 RGB 或 HSB 数值以精确匹配，非常适合品牌颜色。
  </Step>
</Steps>

<video autoPlay muted loop playsInline className="w-full rounded-xl" src="https://mintcdn.com/craft-support/bFuq7qeKyFxnmv1W/images/write-and-edit/styling/block-colors/en/content/custom-block-color.mp4?fit=max&auto=format&n=bFuq7qeKyFxnmv1W&q=85&s=bccaba891fdf8399f03f5ab484ba8a98" data-path="images/write-and-edit/styling/block-colors/en/content/custom-block-color.mp4" />

## 设置您自己的默认块颜色

您还可以用自己的色调替换默认调色板中的任意颜色。如果您希望常用的颜色随时可用，或想在各个文档中使用特定的品牌颜色，这个功能会非常实用。

<Steps>
  <Step title="在调色板颜色上打开上下文菜单">
    在块颜色调色板中，右键点击（macOS）或长按（iOS）您想替换的颜色。
  </Step>

  <Step title="自定义颜色">
    选择自定义颜色的选项，并在取色器中选取您自己的色调。此后，在所有显示块颜色的地方，调色板中该位置都会显示您的颜色。
  </Step>

  <Step title="需要时重置">
    如需恢复原始颜色，再次在该颜色上打开上下文菜单并重置即可。
  </Step>
</Steps>

<video autoPlay muted loop playsInline className="w-full rounded-xl" src="https://mintcdn.com/craft-support/bFuq7qeKyFxnmv1W/images/write-and-edit/styling/block-colors/en/content/default-block-colors.mp4?fit=max&auto=format&n=bFuq7qeKyFxnmv1W&q=85&s=16685de5e91e25ddfbc9882ed7293e00" data-path="images/write-and-edit/styling/block-colors/en/content/default-block-colors.mp4" />

<Info title="表格与合集">
  表格和合集会继承为其设置的块颜色，因此您可以像处理其他内容一样，为这些块做颜色分类。
</Info>

## 相关文章

<CardGroup cols={2}>
  <Card title="背景、颜色与分隔线" href="/zh-Hans/write-and-edit/styling/quick-guide">
    自定义背景、文档与文字颜色以及分隔线
  </Card>

  <Card title="默认样式" href="/zh-Hans/write-and-edit/styling/default-styles">
    将您偏好的样式设为默认样式
  </Card>
</CardGroup>
