> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 颜色转RGB整数（ColorToRGBInt）

<div class="node-meta"><code>ColorToRGBInt</code><span>utilities</span><span>角色：数值读取</span></div>

**ColorToRGBInt** 节点将十六进制格式（如 `#FF5733`）的颜色转换为单个 RGB 整数值。它从颜色字符串中提取红色、绿色和蓝色分量，将它们组合为一个整数，同时返回原始的十六进制表示以及 Alpha（不透明度）值。

## 参数

| 参数      | 类型    | 默认 / 范围 | 说明           |
| ------- | ----- | ------- | ------------ |
| `color` | COLOR | —（连线输入） | 支持十六进制或预设色名。 |

## 输出

| 输出      | 类型    | 说明    |
| ------- | ----- | ----- |
| rgb_int | INT   | 整数    |
| hex     | COLOR | COLOR |
| alpha   | FLOAT | 浮点    |

## 怎么接

- **上游**：图像/潜空间/视频数据
- **下游**：任何 INT 参数口
- **接线**：输出的是数值，可接到任何同类型参数口（右键参数 →「转换为输入」）；常用来把图像尺寸、视频帧数动态传给下游，避免手改参数。

## 使用案例

从 `color`（#ffffff） 开始填就能跑起来。典型接法：`图像` → 本节点 → `任何 INT 参数口`。输出类型是 INT，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

![ColorToRGBInt 端口与连线示意](/svg/ColorToRGBInt.svg)

## 同类节点

[数学表达式](/nodes/10/ComfyMathExpression.md) · [数字转换](/nodes/10/ComfyNumberConvert.md) · [创建边界框](/nodes/10/CreateBoundingBoxes.md) · [创建列表](/nodes/10/CreateList.md) · [曲线编辑器](/nodes/10/CurveEditor.md) · [自定义组合](/nodes/10/CustomCombo.md) · [GetItemFromList](/nodes/10/GetItemFromList.md) · [图像直方图](/nodes/10/ImageHistogram.md) · [预览任意](/nodes/10/PreviewAny.md) · [分辨率选择器](/nodes/10/ResolutionSelector.md) · [种子](/nodes/10/SeedNode.md)
