Skip to content

分类方案

¥Categorical schemes

例如,要使用 重音 配色方案创建分类色标:

¥For example, to create a categorical color scale using the Accent color scheme:

js
const color = d3.scaleOrdinal(d3.schemeAccent);

schemeCategory10

源代码 · 一个包含十种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of ten categorical colors represented as RGB hexadecimal strings.

schemeAccent

源代码 · 一个包含八种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeDark2

源代码 · 一个包含八种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeObservable10

源代码 · 一个包含十种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of ten categorical colors represented as RGB hexadecimal strings.

schemePaired

源代码 · 一个包含十二种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of twelve categorical colors represented as RGB hexadecimal strings.

schemePastel1

源代码 · 一个包含九种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of nine categorical colors represented as RGB hexadecimal strings.

schemePastel2

源代码 · 一个包含八种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeSet1

源代码 · 一个包含九种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of nine categorical colors represented as RGB hexadecimal strings.

schemeSet2

源代码 · 一个包含八种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of eight categorical colors represented as RGB hexadecimal strings.

schemeSet3

源代码 · 一个包含十二种分类颜色的数组,以 RGB 十六进制字符串表示。

¥Source · An array of twelve categorical colors represented as RGB hexadecimal strings.

schemeTableau10

源代码 · 一个包含十种分类颜色的数组,由 Tableau 作为 Tableau 10 的一部分创建,以 RGB 十六进制字符串表示。

¥Source · An array of ten categorical colors authored by Tableau as part of Tableau 10 represented as RGB hexadecimal strings.